Add possibility to retain bucket when destroying the resource
rjcoelho opened this issue · comments
Because if for some reason/mistake, I destroy the resource, I want to retain the bucket (its the user data)
Just expose the lifecycle meta-arg, or the prevent_destroy flag
Keep it to false by default
Thanks
lifecycle {
prevent_destroy = true
}
Can I pass this to the module ?
No, it is not supported in the modules but only on individual resources, and it is not possible to use any variables there.
https://www.terraform.io/docs/language/meta-arguments/lifecycle.html#prevent_destroy
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.