Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -677,6 +685,10 @@ exports[`The RenderingCDKStack matches the snapshot 1`] = `
},
],
"Tags": [
{
"Key": "App",
"Value": "article-rendering",
},
{
"Key": "gu:cdk:version",
"Value": "TEST",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down
8 changes: 5 additions & 3 deletions dotcom-rendering/cdk/lib/renderingStack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,

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.

// 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,

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.

});

const { stack: guStack, region, account } = this;
const { guApp, stage, instanceType, scaling, domainName, ecsProps } =
props;

const artifactsBucket =
GuDistributionBucketParameter.getInstance(this).valueAsString;
Expand Down
Loading