core: Stack Construct: when set stack-level tags with pseudo parameters such as Class Aws.STACK_NAME should emit error #29424
Labels
@aws-cdk/core
Related to core CDK functionality
bug
This issue is a bug.
effort/small
Small work item – less than a day of effort
p1
wontfix
We have determined that we will not resolve the issue.
Describe the bug
In previous closed issue "core: improve experience around stack-level tagging"
#4134
Should have feature "We should emit an error if you try to apply a tag that uses tokens to the Stack itself."
However, when use Stack Class to work on tags, example Python code
CDK
ls and synth
do not emit the error, only whencdk deploy
the expected invalid token value error will be incurred during stack operation when trying to tag resources in the scope:Expected Behavior
When user pass pseudo parameters such as Aws.STACK_NAME, and Aws.REGION to Stack Construct tags. An error should be given due to #4106 (comment)
Current Behavior
CDK ls and synth does not give error.
The Stack construct will pass {Token[AWS.StackName.13]} as stack-level tag value when CDK create-changeset, subsequently causing error when the stack level tags propagate to resources inside of the stack.
Reproduction Steps
Possible Solution
We should emit an error if you try to apply a tag that uses tokens to the Stack itself
Additional Information/Context
No response
CDK CLI Version
2.132.0
Framework Version
No response
Node.js Version
v20.11.1
OS
MacOS
Language
Python
Language Version
No response
Other information
No response
The text was updated successfully, but these errors were encountered: