diff --git a/dotcom-rendering/cdk/lib/__snapshots__/renderingStack.test.ts.snap b/dotcom-rendering/cdk/lib/__snapshots__/renderingStack.test.ts.snap index 3a30ae126fe..bd3743c9fc7 100644 --- a/dotcom-rendering/cdk/lib/__snapshots__/renderingStack.test.ts.snap +++ b/dotcom-rendering/cdk/lib/__snapshots__/renderingStack.test.ts.snap @@ -288,6 +288,10 @@ exports[`The RenderingCDKStack matches the snapshot 1`] = ` "Namespace": "AWS/EC2", "Period": 30, "Tags": [ + { + "Key": "App", + "Value": "article-rendering", + }, { "Key": "gu:cdk:version", "Value": "TEST", @@ -345,6 +349,10 @@ exports[`The RenderingCDKStack matches the snapshot 1`] = ` "CPUScalingAlertsTopic9D0083F7": { "Properties": { "Tags": [ + { + "Key": "App", + "Value": "article-rendering", + }, { "Key": "gu:cdk:version", "Value": "TEST", @@ -677,6 +685,10 @@ exports[`The RenderingCDKStack matches the snapshot 1`] = ` }, ], "Tags": [ + { + "Key": "App", + "Value": "article-rendering", + }, { "Key": "gu:cdk:version", "Value": "TEST", @@ -835,6 +847,10 @@ exports[`The RenderingCDKStack matches the snapshot 1`] = ` "Period": 30, "Statistic": "Average", "Tags": [ + { + "Key": "App", + "Value": "article-rendering", + }, { "Key": "gu:cdk:version", "Value": "TEST", @@ -911,6 +927,10 @@ exports[`The RenderingCDKStack matches the snapshot 1`] = ` "Period": 30, "Statistic": "Average", "Tags": [ + { + "Key": "App", + "Value": "article-rendering", + }, { "Key": "gu:cdk:version", "Value": "TEST", @@ -967,6 +987,10 @@ exports[`The RenderingCDKStack matches the snapshot 1`] = ` "LatencyScalingAlertsTopic1A322157": { "Properties": { "Tags": [ + { + "Key": "App", + "Value": "article-rendering", + }, { "Key": "gu:cdk:version", "Value": "TEST", @@ -1238,6 +1262,7 @@ exports[`The RenderingCDKStack matches the snapshot 1`] = ` "Description": "The rendering base URL for frontend to call the article-rendering app in the PROD environment", "Name": "/frontend/prod/article-rendering.baseURL", "Tags": { + "App": "article-rendering", "Stack": "frontend", "Stage": "PROD", "gu:cdk:version": "TEST", @@ -1426,6 +1451,10 @@ exports[`The RenderingCDKStack matches the snapshot 1`] = ` "Period": 60, "Statistic": "Maximum", "Tags": [ + { + "Key": "App", + "Value": "article-rendering", + }, { "Key": "gu:cdk:version", "Value": "TEST", @@ -3308,6 +3337,7 @@ exports[`The RenderingCDKStack matches the snapshot for Tag Page Rendering CODE "Description": "The rendering base URL for frontend to call the tag-page-rendering app in the CODE environment", "Name": "/frontend/code/tag-page-rendering.baseURL", "Tags": { + "App": "tag-page-rendering", "Stack": "frontend", "Stage": "CODE", "gu:cdk:version": "TEST", @@ -3982,6 +4012,10 @@ exports[`The RenderingCDKStack matches the snapshot for Tag Page Rendering PROD "Namespace": "AWS/EC2", "Period": 30, "Tags": [ + { + "Key": "App", + "Value": "tag-page-rendering", + }, { "Key": "gu:cdk:version", "Value": "TEST", @@ -4039,6 +4073,10 @@ exports[`The RenderingCDKStack matches the snapshot for Tag Page Rendering PROD "CPUScalingAlertsTopic9D0083F7": { "Properties": { "Tags": [ + { + "Key": "App", + "Value": "tag-page-rendering", + }, { "Key": "gu:cdk:version", "Value": "TEST", @@ -5039,6 +5077,10 @@ exports[`The RenderingCDKStack matches the snapshot for Tag Page Rendering PROD }, ], "Tags": [ + { + "Key": "App", + "Value": "tag-page-rendering", + }, { "Key": "gu:cdk:version", "Value": "TEST", @@ -5218,6 +5260,10 @@ exports[`The RenderingCDKStack matches the snapshot for Tag Page Rendering PROD "Period": 30, "Statistic": "Average", "Tags": [ + { + "Key": "App", + "Value": "tag-page-rendering", + }, { "Key": "gu:cdk:version", "Value": "TEST", @@ -5294,6 +5340,10 @@ exports[`The RenderingCDKStack matches the snapshot for Tag Page Rendering PROD "Period": 30, "Statistic": "Average", "Tags": [ + { + "Key": "App", + "Value": "tag-page-rendering", + }, { "Key": "gu:cdk:version", "Value": "TEST", @@ -5350,6 +5400,10 @@ exports[`The RenderingCDKStack matches the snapshot for Tag Page Rendering PROD "LatencyScalingAlertsTopic1A322157": { "Properties": { "Tags": [ + { + "Key": "App", + "Value": "tag-page-rendering", + }, { "Key": "gu:cdk:version", "Value": "TEST", @@ -5758,6 +5812,7 @@ exports[`The RenderingCDKStack matches the snapshot for Tag Page Rendering PROD "Description": "The rendering base URL for frontend to call the tag-page-rendering app in the PROD environment", "Name": "/frontend/prod/tag-page-rendering.baseURL", "Tags": { + "App": "tag-page-rendering", "Stack": "frontend", "Stage": "PROD", "gu:cdk:version": "TEST", @@ -5995,6 +6050,10 @@ exports[`The RenderingCDKStack matches the snapshot for Tag Page Rendering PROD "Period": 60, "Statistic": "Maximum", "Tags": [ + { + "Key": "App", + "Value": "tag-page-rendering", + }, { "Key": "gu:cdk:version", "Value": "TEST", diff --git a/dotcom-rendering/cdk/lib/renderingStack.ts b/dotcom-rendering/cdk/lib/renderingStack.ts index c27944248ec..9585b65e789 100644 --- a/dotcom-rendering/cdk/lib/renderingStack.ts +++ b/dotcom-rendering/cdk/lib/renderingStack.ts @@ -205,17 +205,19 @@ const addLatencyStepScalingPolicy = ( /** DCR infrastructure provisioning via CDK */ export class RenderingCDKStack extends CDKStack { constructor(scope: CDKApp, id: string, props: RenderingCDKStackProps) { + const { guApp, stage, instanceType, scaling, domainName, ecsProps } = + props; + super(scope, id, { - ...props, // Any version of this app should run in the eu-west-1 region env: { region: 'eu-west-1' }, // Set the stack within the constructor as this won't vary between apps stack: 'frontend', + stage, + app: guApp, }); const { stack: guStack, region, account } = this; - const { guApp, stage, instanceType, scaling, domainName, ecsProps } = - props; const artifactsBucket = GuDistributionBucketParameter.getInstance(this).valueAsString;