fc93df704a
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: JamJarchitect <53943045+JamJarchitect@users.noreply.github.com> Co-authored-by: Jack Tracey <41163455+jtracey93@users.noreply.github.com> |
||
---|---|---|
.. | ||
README.md | ||
policy-definition.json |
README.md
Create new policy definition
The ARM template provided in this folder shows how a new policy definition is created at the targeted scope.
Parameters
- "policyName": Provide a name for the policyDefinition
- "policyDescription": Provide a description for the policy
- "namePattern": Provide the naming pattern for this policy to ensure naming convention for all resource names
"parameters": {
"policyName": {
"type": "string",
"metadata": {
"description": "Provide name for the policyDefinition."
}
},
"policyDescription": {
"type": "string",
"metadata": {
"description": "Provide a description for the policy."
}
},
"namePattern": {
"type": "string",
"metadata": {
"description": "Provide naming pattern."
}
}
},
Deploy using AzOps
See these instructions for how to deploy ARM templates with the AzOps GitHub Actions/DevOps pipeline.
Deploy using Azure PowerShell
New-AzManagementGroupDeployment `
-Name <name of deployment> `
-Location <location> `
-ManagementGroupId <mgmtGroupId> `
-TemplateUri "https://raw.githubusercontent.com/Azure/Enterprise-Scale/main/examples/policies/policy-definition/policy-definition.json" `
-policyName <policy name> `
-policyDescription <policy description> `
-namePattern <name pattern>
Deploy using Azure CLI (Bash in Cloud Shell)
az deployment mg create \
--name <name of deployment> \
--location <location> \
--management-group-id <mgmtGroupId> \
--template-uri "https://raw.githubusercontent.com/Azure/Enterprise-Scale/main/examples/policies/policy-definition/policy-definition.json" \
--parameters "{ \"policyName\": { \"value\": \"<policy name>\" }, \"policyDescription\": { \"value\": \"<policy description>\" }, \"namePattern\": { \"value\": \"<name pattern>\" }}"