Skip to content

Instantly share code, notes, and snippets.

@ljtill
Last active April 8, 2021 12:32
Show Gist options
  • Save ljtill/e79c0c0207c4ecb1c3abbba78645185c to your computer and use it in GitHub Desktop.
Save ljtill/e79c0c0207c4ecb1c3abbba78645185c to your computer and use it in GitHub Desktop.
Provides the ability to deploy Management Groups with templates
{
"$schema": "https://schema.management.azure.com/schemas/2019-08-01/tenantDeploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"parentId": {
"type": "string",
"defaultValue": "[subscription().tenantId]"
}
},
"variables": {
"displayName": "Prototype"
},
"resources": [
{
"type": "Microsoft.Management/managementGroups",
"apiVersion": "2020-05-01",
"name": "[guid(variables('displayName'))]",
"scope": "/",
"properties": {
"displayName": "[variables('displayName')]",
"details": {
"parent": {
"id": "[concat('Microsoft.Management/managementGroups/', parameters('parentId'))]"
}
}
}
}
]
}
{
"$schema": "https://schema.management.azure.com/schemas/2019-08-01/tenantDeploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment