terraform icon indicating copy to clipboard operation
terraform copied to clipboard

Feature request: support prevent_destroy for modules

Open tdmalone opened this issue 6 years ago • 32 comments

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

tdmalone avatar Jul 02 '18 01:07 tdmalone