last sync: 2025-Jun-16 17:23:21 UTC

Create Delete Lock on specified Azure VMs

Community Policy definition

Source Repository Community-Policy GitHub
JSON Community-Policy GitHub
Deploy policy 26da082e-29f6-4b47-b640-89010f2a598e (1.0.0) to Azure
Display name Create Delete Lock on specified Azure VMs
Id 26da082e-29f6-4b47-b640-89010f2a598e
Version 1.0.0
Details on versioning
Category Compute
Microsoft Learn
Description List the VM names under the parameter vmName that you want to create a Delete Lock on./nThen expand the deployment variables and the resources to the amount of VMs given in the vmName array parameter. Make sure the values and deployment variables and resources are always aligned in numbers.
Mode All
Type Custom Community
Effect Default
DeployIfNotExists
Allowed
DeployIfNotExists, AuditIfNotExists, Disabled
RBAC role(s)
Role Name Role Id
User Access Administrator 18d7d88d-d35e-4fb5-a5c3-7773c20a72d9
Contributor b24988ac-6180-42a0-ab88-20f7382dd24c
Rule aliases THEN-ExistenceCondition (1)
Alias Namespace ResourceType Path PathIsDefault DefaultPath Modifiable
Microsoft.Authorization/locks/level Microsoft.Authorization locks properties.level True False
Rule resource types IF (1)
Microsoft.Compute/virtualMachines
THEN-Deployment (2)
Microsoft.Authorization/locks
Microsoft.Compute/virtualMachines
JSON
EPAC
Deploy policy 26da082e-29f6-4b47-b640-89010f2a598e (1.0.0) to Azure