Tagging CloudFormation stacks when deploy occurs
Both sam deploy and aws cloudformation deploy CLI commands support an optional --tags argument. This tags argument is the preferred way to apply resource tags across all resources in the CloudFormation stack. Since SAM CLI is not a first-class citizen for Spacelift, the samconfig.toml file cannot be used to customize tags either since the tags in samconfig.toml are only evaluated when a sam deploy occurs.
Similar to the special TF_VAR_ variables supported by Spacelift, I would like to see a CF_VAR_STACK_TAGS (CloudFormation variable) or similar that would be automatically passed to the aws cloudformation deploy command that is executed behind the scenes for CloudFormation stacks running on the Spacelift platform. If the environment variable is not present a given Spacelift stack, the stack should work like it does today. This would allow customizing tags per stack to facilitate simpler tag management which is crucial for automation, compliance, and audit purposes.
I would expect this to be backwards compatible as well.
- Workaround
Log in to comment and vote
Comments2
Tan Milkshake
May 6
Our team is looking for this functionality as well
Bronze Forest
Sep 5, 2024
This feature is critical for us to successfully onboard all of our applications