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

Add termination protection and refactor GHA caching #114

Merged
merged 2 commits into from
Feb 18, 2021
Merged

Conversation

mdial89f
Copy link
Contributor

@mdial89f mdial89f commented Feb 18, 2021

Closes #111
Closes #107

This adds cloudformation termination protection for a list of stage names that are commonly used for important environments. This has the effect of requiring a --force flag to be set if destroying a protected stage with serverless (something we never do programatically, so a human would need to set that). In the console, to delete a protected stack, the termination protection must be manually edited to be disabled.
We have a few safeguards in place to prevent deletion of important stages, but this is a huge add since it's protection baked into cloudformation itself.

    stages: # This is a list of common names for important envs that should not be destroyed.  You can remove the stage names your project doesn't use; this list is meant to be inclusive.
      - master
      - val
      - production
      - develop
      - main
      - impl
      - val
      - prod

Obviously a project only needs to protect the stages it cares about (usually master, val, production), but I added all that we've seen to be more safe than sorry.

The github actions caching logic was also refactored. Same end result, just less code and less things to update when adding a new service.

See issues for more detail.

@mdial89f mdial89f merged commit f3d9bbb into master Feb 18, 2021
@mdial89f mdial89f deleted the prettier branch February 23, 2021 20:10
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.

Refactor GitHub Actions caching logic Implement CF termination protection for selected stages
2 participants