-
Notifications
You must be signed in to change notification settings - Fork 11
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
Should be able to make sure that objects are not removed when stage is set to production #7
Comments
I think your concern is correct. Using PromptYou can use prompt before deleting bucket. custom:
remover:
prompt: true # default value is `false`
buckets:
- remover-bucket-a
- remover-bucket-b |
I think that is a great solution if you are manually uploading. What if the prompt displayed by default if your env was set to
In this case, if the stage was set to production OR and environment variable was set to no-delete, no action would be taken. I think the stage is the most important thing, I put the env distinction in there to cover any other use cases that might have the same concern. |
This would be a very handy feature to have. |
For those getting into this issue willing to have different cleanup setup for each environment, this is the approach I used and it works fine. custom:
remover-config:
default:
buckets:
- a-bucket-name-goes-here
prod:
buckets: []
remover: ${self:custom.remover-config.${self:custom.stage}, self:custom.remover-config.default} |
It feels dangerous that you can destroy all of the data in production with a single accidental command. This plugin should allow you to specify no action given a specific stage setting. That way there is at least some protection from erasing all production data.
The text was updated successfully, but these errors were encountered: