-
Notifications
You must be signed in to change notification settings - Fork 10
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
EREGCSC-2894 Update CDK bootstrap for latest version #1488
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
✨ See the Django Site in action ✨ |
✨ See the Django Site in action ✨ |
✨ See the Django Site in action ✨ |
* add README.md * add requirements.txt due to PyYAML dependency * make role-to-assume a required positional argument
✨ See the Django Site in action ✨ |
PhilR8
approved these changes
Dec 12, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Resolves #2894
Description-
In order for our CDK scripts to reliably deploy/create AWS resources, we need to keep our CDK stacks up to date. Sometimes AWS releases updates, and we have to apply them, and it's happened already!
We decided we wanted to do this automatically via cron'd Github Action, but found it wasn't possible to do this using standard bootstrap procedure because we are relying on a CMS-specific
template.yaml
. By diffing the CMStemplate.yaml
with the default one from CDK, we found it was feasible to create a script (update_template.py
) that attempts to automatically apply those needed changes to the default template.From there, we can automate the bootstrap update procedure.
This pull request changes...
update-cdk-bootstrap.yml
, that runs weekly on Monday and runs the commands needed to execute a CDK bootstrap update.update_template.py
, which takes as CLI arguments a JSON file containing a list of roles to update, the default CDK template to process, and an output filename../update_template.py -h
for more info.update_template.py
to generate a usable one, and then performs the bootstrap on an empty "temp" project directory.Steps to manually verify this change...
You can't directly verify this without merging to prod, because this action runs on a schedule (see the cron section of the action file). Instead, check out this test run. You can go to each environment's run and see that with the updated template.yaml file that the script generates, the bootstrapping process completed successfully for dev, val, and prod.