Closed scottlamb closed 1 year ago
Oops, failed to see an existing issue about this (#15233), closed in favor of https://github.com/aws-cloudformation/cloudformation-coverage-roadmap/issues/780
Comments on closed issues are hard for our team to see. If you need more assistance, please either tag a team member or open a new issue that references this one. If you wish to keep having a conversation with other community members under this issue feel free to do so.
Describe the bug
Imagine this scenario:
ecs_patterns.ApplicationLoadBalancedEc2Service
ecs_patterns.NetworkLoadBalancedEc2Service
instead. In my case, this was because I needed to put it behind aCfnVPCEndpointService
, which apparently only supports NLBs, not ALBs.Expected Behavior
cdk deploy
just works.Current Behavior
cdk deploy
fails, with an error involvingThe following target groups cannot be associated with more than one load balancer
Reproduction Steps
Unsure what to put in here: the CDK snippet is trivial. The important part is the diff:
s/ApplicationLoadBalancedEc2Service/NetworkLoadBalancedEc2Service/
Possible Solution
I found this re:Post question with a solution: the target group's name should contain the load balancer's name, so the deploy won't set up two load balancers at once pointing to the same target group (an invalid change).
My workaround was to comment out the service, deploy, uncomment with the new config, deploy. I didn't need a zero-downtime deploy so this was workable, just an extra paper-cut to figure out why the deploy failed and go through extra steps.
Additional Information/Context
No response
CDK CLI Version
2.42.1 (build 48a95f1)
Framework Version
"aws-cdk": "2.42.1"
Node.js Version
8.19.3
OS
macOS
Language
Typescript
Language Version
TypeScript (4.8.4)
Other information
No response