equinor / terraform-baseline

Best practices for creating reusable Terraform modules using the Azure provider
https://equinor.github.io/terraform-baseline/
MIT License
12 stars 5 forks source link

Add `prevent_destroy` lifecycle meta-argument to all stateful resources #184

Open hknutsen opened 2 months ago

hknutsen commented 2 months ago

Module Name

all modules containing stateful resources

Description

Add prevent_destroy lifecycle meta-argument to all stateful resources to prevent accidental loss of data.

The following modules have been identified as containing stateful resources:

Example Terraform Configuration

resource "azurerm_key_vault" "this" {
  lifecycle {
    # Prevent accidental destroy of Key Vault.
    prevent_destroy = true
  }
}
hknutsen commented 3 weeks ago

Putting on hold until #177 has been closed.