Skip to content

(aws_ecs_patterns): upgrading past 2.221.0 caused outage as target group was recreated #36149

@anthonygerrard

Description

@anthonygerrard

Describe the bug

Looks like the feature flag reference in #33253 did not work. When our application was upgraded past 2.221.0 a destructive change to the loadbalancer target group happened leading to a 2 minute outage during the deployment

Regression Issue

  • Select this option if this issue appears to be a regression.

Last Known Working CDK Library Version

2.220.0

Expected Behavior

No destructive change to the target group

Current Behavior

When you upgrade from 2.222.0 to 2.221 with a private load balancer then the target group is renamed and an outage happens

Reproduction Steps

  • Use a ecsPatterns.ApplicationLoadBalancedFargateService with cdk version 2.220.0 with a private load balancer
  • Upgrade to 2.221.0

Expected

  • no downtime during deployment

Actual

  • destructive change, load balancer target group is recreated

Possible Solution

Only include "Private" in the name if the feature flag is turned on

Additional Information/Context

No response

AWS CDK Library version (aws-cdk-lib)

2.221.0

AWS CDK CLI version

2.1032.0

Node.js Version

22.21.1

OS

Windows

Language

TypeScript

Language Version

5.9.3

Other information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-ecs-patternsRelated to ecs-patterns librarybugThis issue is a bug.needs-triageThis issue or PR still needs to be triaged.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions