(core): When cloudformation spec adds a Tags property to an existing resource, this can break customer deployments or cause unexpected changes #15947
Labels
@aws-cdk/aws-cloudformation
Related to AWS CloudFormation
@aws-cdk/core
Related to core CDK functionality
bug
This issue is a bug.
effort/medium
Medium work item – several days of effort
p2
If a CDK user has added Tags to a construct, those tags will be added to all cloudformation resources within that construct's scope. If the Tags property was added to a resource via a cloudformation spec update, then when the CDK user updates their CDK version, a new Tags property will be added to that resource. This might not be what the user intended, and can cause deployment failures in some cases.
Reproduction Steps
Repro steps for one incarnation of this issue.
What did you expect to happen?
Deployment succeeds after upgrade.
What actually happened?
Deployment failed with error "Update to resource type AWS::CodeDeploy::Application is not supported" after upgrade, because the "Name" tag was added to the CodeDeploy::Application resource inside the
LambdaDeploymentGroup
construct.Workaround
Explicitly remove tags from being added to specific resource types within your constructs.
This is 🐛 Bug Report
The text was updated successfully, but these errors were encountered: