From b07b614e03ff5bddbc4800e9745c09e93c666c31 Mon Sep 17 00:00:00 2001 From: Luke Hoban Date: Thu, 5 Apr 2018 22:33:25 -0700 Subject: [PATCH] Use subnets instead of subnetMappings on LoadBalancer The `subnetMappings` property does not correctly handle changes, but the `subnets` property does - and supports the same use cases we need. Workaround for pulumi/pulumi-terraform#45. --- aws/service.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aws/service.ts b/aws/service.ts index 741c309c..af882ba0 100644 --- a/aws/service.ts +++ b/aws/service.ts @@ -130,7 +130,7 @@ function createLoadBalancer( const loadBalancer = new aws.elasticloadbalancingv2.LoadBalancer(shortName, { loadBalancerType: useAppLoadBalancer ? "application" : "network", - subnetMappings: network.publicSubnetIds.map(s => ({ subnetId: s })), + subnets: network.publicSubnetIds, internal: internal, // If this is an application LB, we need to associate it with the ECS cluster's security group, so // that traffic on any ports can reach it. Otherwise, leave blank, and default to the VPC's group.