Skip to content

fix(cdk): Explicitly apply App tag to taggable resources - #16722

Merged
akash1810 merged 1 commit into
mainfrom
aa/app-tag-everything
Sep 14, 2026
Merged

akash1810 merged 1 commit into
mainfrom
aa/app-tag-everything

Conversation

@akash1810

Copy link
Copy Markdown
Member

What does this change?

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.

CloudWatch Alarms screenshot

image

CloudFormation screenshot

image

Riff-Raff applies the App tag to CloudFormation stacks during deployment. From the riff-raff.yaml, it has used tag-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 App tag value as within GuCDK, they're modelled as app-aware constructs.

Why?

Simplified cost allocation.

How has this change been tested?

See updated snapshot.

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 akash1810 added the maintenance Departmental tracking: maintenance work, not a fix or a feature label Sep 14, 2026
props;

super(scope, id, {
...props,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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,

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See the implementation of GuStack for further detail.

@akash1810
akash1810 marked this pull request as ready for review September 14, 2026 14:27
@akash1810
akash1810 requested a review from a team as a code owner September 14, 2026 14:27
@akash1810
akash1810 added this pull request to the merge queue Sep 14, 2026
Merged via the queue into main with commit eaad08e Sep 14, 2026
35 checks passed
@akash1810
akash1810 deleted the aa/app-tag-everything branch September 14, 2026 16:17
@gu-prout

gu-prout Bot commented Sep 14, 2026

Copy link
Copy Markdown

Seen on PROD (merged by @akash1810 9 minutes and 6 seconds ago) Please check your changes!

@akash1810

akash1810 commented Sep 15, 2026

Copy link
Copy Markdown
Member Author

Confirming tagging of CloudWatch Alarms applied as expected.

Before

image

After

image image

Now, the alarms created in this stack adds to the alarms created in https://github.com/guardian/slo-alerts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Departmental tracking: maintenance work, not a fix or a feature Seen-on-PROD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants