Skip to content

Commit

Permalink
adding an else condition to relate management lock with resource group
Browse files Browse the repository at this point in the history
  • Loading branch information
harkirat22 committed Jan 9, 2021
1 parent 5a19951 commit a05d83d
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,8 @@ resourceLockExist(resource_group) = exists {
resource_group_name := sprintf("azurerm_resource_group.%s", [resource_group.name])
resource_lock_exist_set[resource_group_name]
exists = true
} else = exists {
resource_lock_exist_set := { resource_lock_id | resource_lock_id := split(input.azurerm_management_lock[i].config.scope, ".")[1] }
resource_lock_exist_set[resource_group.name]
exists = true
}

0 comments on commit a05d83d

Please sign in to comment.