terraform
terraform copied to clipboard
Feature request: support prevent_destroy for modules
Terraform Version
Terraform v0.11.7
Terraform Configuration Files
module "test" {
source = "../modules/module-example"
lifecycle {
prevent_destroy = true
}
}
Expected Behavior
I was hoping I could prevent destroy of any resources created by the module.
Actual Behavior
Error: module "test": "lifecycle" is not a valid argument
References
- #3116 relates to a potential workaround where you want to be able to configure
lifecycle
attributes with interpolations, which would get around this issue but for self-managed modules only