From 170ea8cfa599d5608f1582e0c3682c1b74c13616 Mon Sep 17 00:00:00 2001 From: Jin Jie <60531983+Scottpedia@users.noreply.github.com> Date: Sat, 20 Mar 2021 22:33:12 -0400 Subject: [PATCH] Fix availability zone selection (#953) * Update cloudformation-template-ipsec.json Co-authored-by: Scottpedia --- aws/cloudformation-template-ipsec.json | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/aws/cloudformation-template-ipsec.json b/aws/cloudformation-template-ipsec.json index 1332983..8bd3ef2 100644 --- a/aws/cloudformation-template-ipsec.json +++ b/aws/cloudformation-template-ipsec.json @@ -291,7 +291,12 @@ "CidrBlock": "10.0.0.0/24", "MapPublicIpOnLaunch": true, "AvailabilityZone": { - "Fn::Sub": "${AWS::Region}a" + "Fn::Select": [ + "0", + { + "Fn::GetAZs": "" + } + ] } }, "Metadata": { @@ -431,7 +436,12 @@ "Ref": "VpnSubnet" }, "AvailabilityZone": { - "Fn::Sub": "${AWS::Region}a" + "Fn::Select": [ + "0", + { + "Fn::GetAZs": "" + } + ] }, "InstanceType": { "Ref": "InstanceType" @@ -507,7 +517,12 @@ "Type": "AWS::EC2::Volume", "Properties": { "AvailabilityZone": { - "Fn::Sub": "${AWS::Region}a" + "Fn::Select": [ + "0", + { + "Fn::GetAZs": "" + } + ] }, "Size": 8 },