AwsCdkCli: Error occurred while deploying a stack that reads resource values from SSM in version 2.161.1
- Dominant language
- TypeScript
- Stars
- 12.9k
- Forks
- 4.6k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 83
Description
### Describe the bug
Our CDK application is breaking. We're trying to add tags to all resources within the CloudFormation template by reading the values from the SSM Parameter Store. However, during deployment with the latest version, we're encountering the following error on the latest version:
Error: Stack tags may not contain deploy-time values (tag: awsApplication=${Token[TOKEN.16]}). Apply tags containing deploy-time values to resources only, avoid tagging stacks.
Our requirement is to add a tag from the SSM Parameter Store to all resources within the stack. Please either resolve this issue or provide an alternative solution to achieve this.
https://github.com/aws/aws-cdk/pull/31457
### Regression Issue
- [ ] Select this option if this issue appears to be a regression.
### Last Known Working CDK Version
_No response_
### Expected Behavior
It should work.
### Current Behavior
It does not work.
### Reproduction Steps
Our requirement is to add a tag from the SSM Parameter Store to all resources within the stack. Please either resolve this issue or provide an alternative solution to achieve this, which doesn't work in version 2.161.1.
### Possible Solution
_No response_
### Additional Information/Context
_No response_
### CDK CLI Version
2.161.1
### Framework Version
_No response_
### Node.js Version
22
### OS
MacOS
### Language
TypeScript
### Language Version
_No response_
### Other information
_No response_
Contributor guide
Research direction
Start by reproducing the deployment with AWS CDK CLI 2.161.1, a stack tag sourced from SSM Parameter Store, and the TypeScript setup described in the issue. Read the behavior change discussed in pull request 31457 and identify where stack tags reject deploy-time values. Done means SSM-derived values can tag all intended resources without triggering the stack-tag error, with the expected deployment behavior covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, node.js, typescript
- Domain
- cloud, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100