terraform-aws-modules/terraform-aws-route53

Add prevent_destroy to zone's module.

IlitoAgrolend opened this issue · 2 comments

Is this feature available in the AWS provider for Terraform?

Yes, https://www.terraform.io/docs/language/meta-arguments/lifecycle.html

Is your request related to a problem? Please describe.

Accidental or malicious deletion of DNS records is one important cause of IT service unavailability. For instance, if a DNS record is deleted from a domain controller, users might not be able to log in or access the service. It would be safer if there was an option to enable the prevent_destroy option by default in the aws_route53_one resource

Describe the solution you'd like.

An option to enable the prevent_destroy option by default in the aws_route53_one resource

Describe alternatives you've considered.

Add to zone's module this option:

lifecycle {
    prevent_destroy = var.prevent_destroy
  }

Additional context

n/a

Hi @IlitoAgrolend !

Terraform does not allow us to use variables in lifecycle, so we can't make it work for everyone.

Closing this issue.

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.