last sync: 2021-Sep-24 16:09:49 UTC

Azure Policy definition

Allowed resource types

Name Allowed resource types
Azure Portal
Id a08ec900-254a-4555-9bf5-e42af04b5c5c
Version 1.0.0
details on versioning
Category General
Microsoft docs
Description This policy enables you to specify the resource types that your organization can deploy. Only resource types that support 'tags' and 'location' will be affected by this policy. To restrict all resources please duplicate this policy and change the 'mode' to 'All'.
Mode Indexed
Type BuiltIn
Preview FALSE
Deprecated FALSE
Effect Fixed: deny
Used RBAC Role none
History none
Used in Initiatives none
JSON
{
  "displayName": "Allowed resource types",
  "policyType": "BuiltIn",
  "mode": "Indexed",
  "description": "This policy enables you to specify the resource types that your organization can deploy. Only resource types that support 'tags' and 'location' will be affected by this policy. To restrict all resources please duplicate this policy and change the 'mode' to 'All'.",
  "metadata": {
    "version": "1.0.0",
    "category": "General"
  },
  "parameters": {
    "listOfResourceTypesAllowed": {
      "type": "Array",
      "metadata": {
        "description": "The list of resource types that can be deployed.",
        "displayName": "Allowed resource types",
        "strongType": "resourceTypes"
      }
    }
  },
  "policyRule": {
    "if": {
      "not": {
        "field": "type",
        "in": "[parameters('listOfResourceTypesAllowed')]"
      }
    },
    "then": {
      "effect": "deny"
    }
  }
}