Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMDCT-4184 cdk-side prepping cdk to import Cloudfront Distribution #14991

Open
wants to merge 10 commits into
base: jon-cdk
Choose a base branch
from

Conversation

peoplespete
Copy link

@peoplespete peoplespete commented Dec 9, 2024

Description

This change is not to be deployed until we are ready to convert to cdk. For full details of the order of events recommended to preserve our Cloudfront Distribution check out this readme: https://github.com/Enterprise-CMCS/macpro-mdct-seds/blob/cmdct-4184-cdk/import_instructions.md
The idea is that by preserving Cloudfront Distribution we will be able to deploy cdk without requiring any external DNS changes. 🎉

Related ticket

CMDCT-4184


How to test

If you want to you can do the following to test this PR:

  1. checkout pete-sls (matching master at the moment) branch
  2. deploy serverless via run script (check that cloudfront distribution points at app front end)
  3. checkout cmdct-4184-sls
  4. deploy serverless via run script (check that cloudfront distribution is stripped down and no longer points at app front end)
  5. destroy serverless assets via ./run destroy command
  6. verify that distribution still exists
  7. checkout cmdct-4184-cdk and comment out all code for the distribution (and things that depend on it)
  8. deploy cdk via run command
  9. comment IN the simplified distribution section
  10. run cdk import
  11. deploy cdk via run command
  12. comment OUT the simplified distribution section and comment IN the final distribution section
  13. deploy cdk via run command
  14. verify that the cloudfront distribution is now in the cdk stack and points to the application.

Notes

NA


Pre-review checklist

  • I have added thorough tests, if necessary
  • I have updated relevant documentation, if necessary
  • I have performed a self-review of my code
  • I have manually tested this PR in the deployed cloud environment

Pre-merge checklist

Review

  • Design: This work has been reviewed and approved by design, if necessary
  • Product: This work has been reviewed and approved by product owner, if necessary

Security

If either of the following are true, notify the team's ISSO (Information System Security Officer).

  • These changes are significant enough to require an update to the SIA.
  • These changes are significant enough to require a penetration test.

convert to a different template: test → val | val → prod

@@ -136,7 +148,6 @@ export function createUiComponents(props: CreateUiComponentsProps) {
const applicationEndpointUrl = `https://${distribution.distributionDomainName}/`;

setupWaf(scope, stage, project, deploymentConfigParameters);
setupRoute53(scope, distribution, deploymentConfigParameters);
Copy link
Author

Choose a reason for hiding this comment

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

This was never actually being created or used.

@@ -95,6 +93,20 @@ export function createUiComponents(props: CreateUiComponentsProps) {
}
);

// new cloudfront.Distribution(
Copy link
Author

Choose a reason for hiding this comment

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

This is the simplified version of the distribution that will initially be used for import. Once imported we'll update it to bring it back into the fully featured setup Jon got working for cdk.

@peoplespete peoplespete marked this pull request as ready for review December 10, 2024 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant