terraform-community-modules / tf_aws_elasticsearch

[DEPRECATED] Use https://github.com/terraform-aws-modules/terraform-aws-opensearch
MIT License
79 stars 97 forks source link

[Feature Request] prevent destroy #45

Closed worldtiki closed 4 years ago

worldtiki commented 4 years ago

Terrafom has this nice feature called prevent_destroy to reject plans which would otherwise destroy the objects associated with the resource.

This feature seems to be widely used in other projects (including other alternatives to this ES module). Would it make sense to add it in here (configurable)? I'm happy to create a pr with these changes.

https://www.terraform.io/docs/configuration/resources.html#prevent_destroy

antonbabenko commented 4 years ago

prevent_destroy as well as other lifecycle meta-arguments is not possible to parametrize with variable (an error will be Variables may not be used here.), so it can't be part of the reusable module.