Skip to content

Commit cb7df73

Browse files
puretensionAbogical
authored andcommitted
fix(ecs-patterns): update feature flag documentation for uniqueTargetGroupId
Signed-off-by: puretension <rlrlfhtm5@gmail.com>
1 parent c006f77 commit cb7df73

File tree

2 files changed

+27
-2
lines changed

2 files changed

+27
-2
lines changed

packages/aws-cdk-lib/cx-api/FEATURE_FLAGS.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ Flags come in three types:
107107
| [@aws-cdk/core:explicitStackTags](#aws-cdkcoreexplicitstacktags) | When enabled, stack tags need to be assigned explicitly on a Stack. | 2.205.0 | new default |
108108
| [@aws-cdk/aws-signer:signingProfileNamePassedToCfn](#aws-cdkaws-signersigningprofilenamepassedtocfn) | Pass signingProfileName to CfnSigningProfile | 2.212.0 | fix |
109109
| [@aws-cdk/aws-ecs-patterns:secGroupsDisablesImplicitOpenListener](#aws-cdkaws-ecs-patternssecgroupsdisablesimplicitopenlistener) | Disable implicit openListener when custom security groups are provided | 2.214.0 | new default |
110+
| [@aws-cdk/aws-ecs-patterns:uniqueTargetGroupId](#aws-cdkaws-ecs-patternsuniquetargetgroupid) | When enabled, ECS patterns will generate unique target group IDs to prevent conflicts during load balancer replacement | V2NEXT | fix |
110111

111112
<!-- END table -->
112113

@@ -197,7 +198,8 @@ The following json shows the current recommended set of flags, as `cdk init` wou
197198
"@aws-cdk/s3-notifications:addS3TrustKeyPolicyForSnsSubscriptions": true,
198199
"@aws-cdk/aws-ec2:requirePrivateSubnetsForEgressOnlyInternetGateway": true,
199200
"@aws-cdk/aws-s3:publicAccessBlockedByDefault": true,
200-
"@aws-cdk/aws-lambda:useCdkManagedLogGroup": true
201+
"@aws-cdk/aws-lambda:useCdkManagedLogGroup": true,
202+
"@aws-cdk/aws-ecs-patterns:uniqueTargetGroupId": true
201203
}
202204
}
203205
```
@@ -2277,4 +2279,26 @@ override this behavior.
22772279
**Compatibility with old behavior:** You can pass `openListener: true` explicitly to maintain the old behavior.
22782280

22792281

2282+
### @aws-cdk/aws-ecs-patterns:uniqueTargetGroupId
2283+
2284+
*When enabled, ECS patterns will generate unique target group IDs to prevent conflicts during load balancer replacement*
2285+
2286+
Flag type: Backwards incompatible bugfix
2287+
2288+
When this feature flag is enabled, ECS patterns will generate unique target group IDs that include
2289+
both the load balancer type (public/private) and load balancer name. This prevents CloudFormation
2290+
conflicts when switching between public and private load balancers or when changing load balancer names.
2291+
2292+
Without this flag, target groups use generic IDs like 'ECS' which can cause conflicts when the
2293+
underlying load balancer is replaced due to changes in internetFacing or loadBalancerName properties.
2294+
2295+
This is a breaking change as it will cause target group replacement when the flag is enabled.
2296+
2297+
2298+
| Since | Unset behaves like | Recommended value |
2299+
| ----- | ----- | ----- |
2300+
| (not in v1) | | |
2301+
| V2NEXT | `false` | `true` |
2302+
2303+
22802304
<!-- END details -->

packages/aws-cdk-lib/recommended-feature-flags.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,6 @@
7878
"@aws-cdk/s3-notifications:addS3TrustKeyPolicyForSnsSubscriptions": true,
7979
"@aws-cdk/aws-ec2:requirePrivateSubnetsForEgressOnlyInternetGateway": true,
8080
"@aws-cdk/aws-s3:publicAccessBlockedByDefault": true,
81-
"@aws-cdk/aws-lambda:useCdkManagedLogGroup": true
81+
"@aws-cdk/aws-lambda:useCdkManagedLogGroup": true,
82+
"@aws-cdk/aws-ecs-patterns:uniqueTargetGroupId": true
8283
}

0 commit comments

Comments
 (0)