Skip to content

feat: Dual stack Gateway app with CDK#3317

Draft
AshCorr wants to merge 1 commit intomainfrom
ash/CDK2
Draft

feat: Dual stack Gateway app with CDK#3317
AshCorr wants to merge 1 commit intomainfrom
ash/CDK2

Conversation

@AshCorr
Copy link
Member

@AshCorr AshCorr commented Feb 5, 2026

What does this change?

Spins up a separate stack of Gateway thats definied by CDK rather than Cloudformation. This allows us to take advantage of some newer features DevX have developed like standardized alarms and logging.

It also brings us closer to the organizations goal to migrate slowly to CDK from YAML.

This PR will provision 2 domains which will be accessed by fastly:

  • gateway-origin.guardianapis.com
  • gateway-origin.code.dev-guardianapis.com

This follows the pattern used by Gatehouse https://github.com/guardian/gatehouse/blob/3e7ad9fdf34b3d9dc559fc7b5a5d9abf499ded79/cdk/bin/cdk.ts#L17. Eventually, we'll switch Fastly to point to the new origin domain and then tear down the old stack.

How has this change been tested?

Deployed to CODE and updated the Fastly VCL to point to the new Origin.

Rollback Steps

Annoyingly, after this PR is deployed it can't be automatically rolled back due to changes in the Cloudformation parameters & deletion protection on the Load Balancer

  1. Edit new Load Balancer and remove Deletion Protection
  2. Manually deploy Cloudformation. Set the VpcId parameter to the ID of the Primary VPC (take a look at the Primary VPC SSM variable)
  3. Deploy Gateway main on riff-raff
  4. Delete the created ACM Certificate

@AshCorr AshCorr added the maintenance Departmental tracking: maintenance work, not a fix or a feature label Feb 5, 2026
@AshCorr AshCorr added the run_tests Run Cypress & Chromatic label Feb 5, 2026
@github-actions
Copy link

github-actions bot commented Feb 5, 2026

@AshCorr AshCorr force-pushed the ash/CDK2 branch 12 times, most recently from ba4f26d to 411fefb Compare February 5, 2026 16:56
PROD: IdentityGateway-euwest-1-PROD.template.json
amiEncrypted: true
templateParameters:
VpcId: /account/vpc/primary/id
Copy link
Member Author

Choose a reason for hiding this comment

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

This needs to be set for the first deployment to overwrite the existing VpcId parameter. CDK unfortunately doesn't seem to let us use an alternative name.

bucketSsmLookup: true
bucketSsmKey: /account/services/identity.artifact.bucket
prefixStack: false
asgMigrationInProgress: true
Copy link
Member Author

Choose a reason for hiding this comment

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

Riffraff gets angry when theres 2 ASG's with the same Stack, Stage, App tags unless you set this flag to tell it that its ok!

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 run_tests Run Cypress & Chromatic

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant