Skip to content

Commit 928bc5a

Browse files
fetch VPC ID from stack output (#518)
1 parent 0b55f71 commit 928bc5a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tests/tekton-resources/tasks/setup/eks/awscli-vpc.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,9 @@ spec:
2222
curl -s $(params.vpc-cfn-url) -o ./amazon-vpc-eks
2323
aws cloudformation --region $(params.region) deploy --stack-name $(params.stack-name) --template-file ./amazon-vpc-eks
2424
25-
VPC_ID=$(aws ec2 describe-vpcs \
26-
--filters "Name=tag:Name,Values=$(params.stack-name)-VPC" \
27-
--query 'Vpcs[0].VpcId' \
28-
--output text)
25+
VPC_ID=$(aws cloudformation describe-stacks --stack-name $(params.stack-name) --query "Stacks[0].Outputs[?OutputKey=='VpcId'].OutputValue" --output text)
26+
27+
echo "VPC_ID: $(VPC_ID)"
2928
3029
# Get all subnets with /12 CIDR blocks from the VPC
3130
SUBNETS=$(aws ec2 describe-subnets \

0 commit comments

Comments
 (0)