From 5475a129d25740df814250cd2cf42c10e368eaaf Mon Sep 17 00:00:00 2001 From: Adam Ruka Date: Fri, 22 Nov 2019 11:47:38 -0800 Subject: [PATCH] fix: update the Python URL shortener example with the new cdk.context.json used by the VPC provider (#170) Fixes the build of the project. --- python/ecs/cluster/app.py | 2 +- python/url-shortener/cdk.context.json | 76 ++++++++++++++++----------- 2 files changed, 46 insertions(+), 32 deletions(-) diff --git a/python/ecs/cluster/app.py b/python/ecs/cluster/app.py index 37bc2b7c29..790ddf0a84 100644 --- a/python/ecs/cluster/app.py +++ b/python/ecs/cluster/app.py @@ -24,7 +24,7 @@ def __init__(self, scope: core.Construct, id: str, **kwargs) -> None: update_type=autoscaling.UpdateType.REPLACING_UPDATE, desired_capacity=3, vpc=vpc, - vpc_subnets={'subnetType': ec2.SubnetType.PUBLIC} + vpc_subnets={ 'subnet_type': ec2.SubnetType.PUBLIC }, ) cluster = ecs.Cluster( diff --git a/python/url-shortener/cdk.context.json b/python/url-shortener/cdk.context.json index 823a107497..23f1a5a47a 100644 --- a/python/url-shortener/cdk.context.json +++ b/python/url-shortener/cdk.context.json @@ -1,36 +1,50 @@ { - "vpc-provider:account=111111111111:filter.vpc-id=vpc-11111111111111111:region=us-east-1": { + "vpc-provider:account=111111111111:filter.vpc-id=vpc-11111111111111111:region=us-east-1:returnAsymmetricSubnets=true": { "vpcId": "vpc-11111111111111111", - "availabilityZones": [ - "us-east-1a", - "us-east-1b", - "us-east-1c" - ], - "privateSubnetIds": [ - "subnet-0096fdd5c93924860", - "subnet-0b4f435f11e937151", - "subnet-0136992e35ea88fe2" - ], - "privateSubnetNames": [ - "Private" - ], - "privateSubnetRouteTableIds": [ - "rtb-09d0493b9c095c1fa", - "rtb-0dec4782dc826b93b", - "rtb-035992729886f3420" - ], - "publicSubnetIds": [ - "subnet-0240a38329b9e2841", - "subnet-0328da1132e7d38c2", - "subnet-0ff88de2b066463c9" - ], - "publicSubnetNames": [ - "Public" - ], - "publicSubnetRouteTableIds": [ - "rtb-037fe65bfb5728835", - "rtb-07ccdcadf111c8e21", - "rtb-0232970151c7ef3fd" + "availabilityZones": [], + "subnetGroups": [ + { + "name": "Public", + "type": "Public", + "subnets": [ + { + "subnetId": "subnet-0240a38329b9e2841", + "availabilityZone": "us-east-1a", + "routeTableId": "rtb-037fe65bfb5728835" + }, + { + "subnetId": "subnet-0328da1132e7d38c2", + "availabilityZone": "us-east-1b", + "routeTableId": "rtb-07ccdcadf111c8e21" + }, + { + "subnetId": "subnet-0ff88de2b066463c9", + "availabilityZone": "us-east-1c", + "routeTableId": "rtb-0232970151c7ef3fd" + } + ] + }, + { + "name": "Private", + "type": "Private", + "subnets": [ + { + "subnetId": "subnet-0096fdd5c93924860", + "availabilityZone": "us-east-1a", + "routeTableId": "rtb-09d0493b9c095c1fa" + }, + { + "subnetId": "subnet-0b4f435f11e937151", + "availabilityZone": "us-east-1b", + "routeTableId": "rtb-0dec4782dc826b93b" + }, + { + "subnetId": "subnet-0136992e35ea88fe2", + "availabilityZone": "us-east-1c", + "routeTableId": "rtb-035992729886f3420" + } + ] + } ] } }