Skip to content

Commit

Permalink
Need to refactor locks
Browse files Browse the repository at this point in the history
  • Loading branch information
frasermolyneux committed Jul 1, 2024
1 parent 06b69ec commit be34f68
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions terraform/common.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ resource "azurerm_resource_group" "rg" {
tags = var.tags
}

resource "azurerm_management_lock" "rg_lock" {
count = var.environment == "prd" ? 1 : 0

name = "Terraform (CanNotDelete) - ${random_id.lock.hex}"
scope = azurerm_resource_group.rg.id
lock_level = "CanNotDelete"
notes = "CanNotDelete Lock managed by Terraform to prevent manual or accidental deletion of resource group and resources"
}
//resource "azurerm_management_lock" "rg_lock" {
// count = var.environment == "prd" ? 1 : 0
//
// name = "Terraform (CanNotDelete) - ${random_id.lock.hex}"
// scope = azurerm_resource_group.rg.id
// lock_level = "CanNotDelete"
// notes = "CanNotDelete Lock managed by Terraform to prevent manual or accidental deletion of resource group and resources"
//}

0 comments on commit be34f68

Please sign in to comment.