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

Feature request: add option to remove database from state instead of dropping it during delete #94

Open
noxjonas opened this issue Oct 26, 2023 · 1 comment

Comments

@noxjonas
Copy link

This is a feature request.

Since in terraform it's impossible to set the prevent_destroy lifecycle hook using variables (see hashicorp/terraform#22544) it would be nice if this could be handled by the provider.

My use case is that in dev environments, I want this provider to create/destroy databases without any issues and blockers. However, if I create/import a production database, it would be nice to mitigate potential danger of outright destroying a database. Since the type of environment is set via variables, setting the prevent_destroy lifecycle hook in code would cause problems in dev.

One implementation that would work is a remove_from_state_instead_of_delete bool input or something, which would do as it says: remove the database from state, but do not actually drop the database.

One workaround currently is to use a user without the grant to drop databases to manage resources in prod.

@piotrkochan
Copy link

Just use Terraform state rm

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

No branches or pull requests

2 participants