Skip to content

Instantly share code, notes, and snippets.

@krnese
Created April 14, 2020 15:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save krnese/a1bb0679e9250ad2a3112e4a27498dde to your computer and use it in GitHub Desktop.
Save krnese/a1bb0679e9250ad2a3112e4a27498dde to your computer and use it in GitHub Desktop.
ARM to trigger deployIfNotExist policies
{
"$schema": "https://schema.management.azure.com/schemas/2019-08-01/tenantDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"policyDefinitionId": {
"type": "string"
},
"policyAssignmentId": {
"type": "string"
}
},
"resources": [
{
"type": "Microsoft.Resources/deployments",
"apiVersion": "2018-05-01",
"location": "[deployment().location]",
"name": "policyResourceDeployment",
"dependsOn": [
],
"properties": {
"mode": "incremental",
"template": "[reference(parameters('policyDefinitionId'), '2018-05-01').policyRule.then.details.deployment.properties.template]",
"parameters": "[reference(parameters('policyAssignmentId'), '2018-05-01').parameters]"
}
}
],
"outputs": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment