如何使用策略强制实施 Azure 应用服务计划层

时间:2021-04-10 00:41:22

标签: azure azure-web-app-service azure-policy

我对 Azure 还很陌生,我正在努力使用策略来实施治理。我整理了这个政策定义:

{
  "mode": "All",
  "policyRule": {
    "if": {
      "not": {
        "field": "kind",
        "in": "[parameters('allowedSKUs')]"
      }
    },
    "then": {
      "effect": "deny"
    }
  },
  "parameters": {
    "allowedSKUs": {
      "type": "Array",
      "metadata": {
        "displayName": "Allowed Storage SKU",
        "description": "The list of allowed skus for resources.",
        "strongType": "storageSkus"
      }
    }
  }
}

我希望能够为在分配的订阅中创建的所有应用服务计划强制执行“F1”定价层,但在分配此策略时,它似乎只为我提供“存储选项”。我如何使用 Azure 策略定义强制执行此操作。

1 个答案:

答案 0 :(得分:1)

检查这个:

UserControl

我找不到应用 SKU 的强类型。