Skip to content

Commit 1ed6516

Browse files
committed
Add suggested prevent destroy to key vault resources
1 parent 85816ec commit 1ed6516

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

terraform/keyvault.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,18 @@ resource "azurerm_key_vault" "kv" {
66
sku_name = "standard"
77
purge_protection_enabled = true
88
soft_delete_retention_days = 7
9+
10+
lifecycle {
11+
prevent_destroy = true
12+
}
913
}
1014

1115
resource "azurerm_key_vault_secret" "ai_connection_string" {
1216
name = "ApplicationInsights--ConnectionString"
1317
value = azurerm_application_insights.ai.connection_string
1418
key_vault_id = azurerm_key_vault.kv.id
19+
20+
lifecycle {
21+
prevent_destroy = true
22+
}
1523
}

0 commit comments

Comments
 (0)