【问题标题】:cannot be deleted because deletion protection is enabled -Terraformcannot be deleted because deletion protection is enabled -Terraform
【发布时间】:2022-12-01 19:16:26
【问题描述】:

I have created ALB through terraform with enable_deletion_protection = true

However when I tried deleting it with enable_deletion_protection = false

It is not happening and also I have also gone through several other stuff to get the solution. Any Suggestion on this ?

【问题讨论】:

    标签: amazon-web-services aws-application-load-balancer terraform-modules


    【解决方案1】:

    The entire point of enable_deletion_protection is tomake it difficult to delete. You have to change it using AWS Console, or local-exec in Terraform.

    【讨论】:

    • Alright @Marcin However I was thinking there might be a way to make it happen through terraform configuration. Anyway thanks for the help
    • @Ak361 Yes, using local-exec you can do it in TF.
    【解决方案2】:

    There are two steps involved in this:

    First change enable_deletion_protection = true to enable_deletion_protection = false. Then run terraform apply This will then allow the resource to be deleted.

    Second, run terraform destroy

    【讨论】:

      猜你喜欢
      • 2013-11-13
      • 1970-01-01
      • 2022-11-16
      • 2021-03-20
      • 1970-01-01
      • 2021-05-29
      • 2022-06-16
      • 2022-01-03
      • 1970-01-01
      相关资源
      最近更新 更多