last sync: 2021-Jul-23 16:37:57 UTC

Azure Policy definition

Web apps should use an Azure file share for its content directory

Name Web apps should use an Azure file share for its content directory
Azure Portal
Id dcbc65aa-59f3-4239-8978-3bb869d82604
Version 1.0.0
details on versioning
Category App Service
Microsoft docs
Description The content directory of a web app should be located on an Azure file share. The storage account information for the file share must be provided before any publishing activity. To learn more about using Azure Files for hosting app service content refer to https://go.microsoft.com/fwlink/?linkid=2151594.
Mode Indexed
Type BuiltIn
Preview FALSE
Deprecated FALSE
Effect Default: Audit
Allowed: (Audit, Disabled)
Used RBAC Role none
History
Date/Time (UTC ymd) (i) Change type Change detail
2021-03-02 15:11:40 add dcbc65aa-59f3-4239-8978-3bb869d82604
Used in Initiatives none
JSON
{
  "properties": {
    "displayName": "Web apps should use an Azure file share for its content directory",
    "policyType": "BuiltIn",
    "mode": "Indexed",
    "description": "The content directory of a web app should be located on an Azure file share. The storage account information for the file share must be provided before any publishing activity. To learn more about using Azure Files for hosting app service content refer to https://go.microsoft.com/fwlink/?linkid=2151594.",
    "metadata": {
      "version": "1.0.0",
      "category": "App Service"
    },
    "parameters": {
      "effect": {
        "type": "String",
        "metadata": {
          "displayName": "Effect",
          "description": "Enable or disable the execution of the policy"
        },
        "allowedValues": [
          "Audit",
          "Disabled"
        ],
        "defaultValue": "Audit"
      }
    },
    "policyRule": {
      "if": {
        "allOf": [
          {
            "field": "type",
            "equals": "Microsoft.Web/sites"
          },
          {
            "field": "kind",
            "like": "app*"
          },
          {
            "field": "Microsoft.Web/sites/storageAccountRequired",
            "equals": "true"
          }
        ]
      },
      "then": {
      "effect": "[parameters('effect')]"
      }
    }
  },
  "id": "/providers/Microsoft.Authorization/policyDefinitions/dcbc65aa-59f3-4239-8978-3bb869d82604",
  "type": "Microsoft.Authorization/policyDefinitions",
  "name": "dcbc65aa-59f3-4239-8978-3bb869d82604"
}