Use Azure Resource Manager policies

Use Azure Resource Manager policies

Q. What can I do with Azure Resource Manager policies?

A. Azure Resource Manager policies as the name implies enables custom policies to be created and then applied to a scope which can be a subscription, resource group or individual resource. The policies are made up of conditional operators and an effect which in most cases would be deny since the default policies are "allow". Common use cases include enabling resource creation only for certain cost centers and for only certain regions. Microsoft has full documentation at https://azure.microsoft.com/en-us/documentation/articles/resource-manager-policy/ with examples of policy creation and application. Below is an example policy that ensures resources are only created in Europe.

{
  "if" : {
    "not" : {
      "field" : "location",
      "in" : ["northeurope" , "westeurope"]
    }
  },
  "then" : {
    "effect" : "deny"
  }
}

 

Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish