fix(cdk): Explicitly apply App tag to taggable resources - #16722
Merged
Merged
Conversation
Explicitly adds the `App` tag to resources. Specifically, these resources: - `AWS::CloudWatch::Alarm` - `AWS::SNS::Topic` If we look in the AWS console, these resources do have an `App` tag, implicitly applied from the tags of the parent CloudFormation stack. Riff-Raff applies the `App` tag to CloudFormation stacks during deployment. From the `riff-raff.yaml`, it has used `tag-page-rendering-cfn`. Therefore, this change also corrects the resource tags, making cost allocation easier.
akash1810
commented
Sep 14, 2026
| props; | ||
|
|
||
| super(scope, id, { | ||
| ...props, |
Member
Author
There was a problem hiding this comment.
Most of the props weren't applicable to this super call so its easier to be explicit.
| // Set the stack within the constructor as this won't vary between apps | ||
| stack: 'frontend', | ||
| stage, | ||
| app: guApp, |
Member
Author
There was a problem hiding this comment.
See the implementation of GuStack for further detail.
akash1810
marked this pull request as ready for review
September 14, 2026 14:27
JamieB-gu
approved these changes
Sep 14, 2026
connoromalleyatwork
approved these changes
Sep 14, 2026
|
Seen on PROD (merged by @akash1810 9 minutes and 6 seconds ago) Please check your changes! |
Member
Author
|
Confirming tagging of CloudWatch Alarms applied as expected. Before
After
Now, the alarms created in this stack adds to the alarms created in https://github.com/guardian/slo-alerts. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



What does this change?
Explicitly adds the
Apptag to resources. Specifically, these resources:AWS::CloudWatch::AlarmAWS::SNS::TopicIf we look in the AWS console, these resources do have an
Apptag, implicitly applied from the tags of the parent CloudFormation stack.CloudWatch Alarms screenshot
CloudFormation screenshot
Riff-Raff applies the
Apptag to CloudFormation stacks during deployment. From theriff-raff.yaml, it has usedtag-page-rendering-cfn(and similar for the other rendering apps). Therefore, this change also corrects the resource tags, making cost allocation easier.Other resources, such as security groups, load balancers etc. have the correct
Apptag value as within GuCDK, they're modelled as app-aware constructs.Why?
Simplified cost allocation.
How has this change been tested?
See updated snapshot.