【问题标题】:Why does Azure template error with resource not found?为什么找不到资源的 Azure 模板错误?
【发布时间】:2021-09-18 20:39:15
【问题描述】:

我正在尝试使用 Azure 部署模板来创建具有特定 deliveryPolicy 的端点。我跑:

az deployment sub create --location UKSouth --template-file azuredeploy.json 
--parameters azuredeploy.parameters.json

哪些错误:

"The Resource 'Microsoft.Cdn/profiles/GEN-UNIQUE' under resource group '<null>' 
was not found. 

我的部署文件如下所示:

    ..."resources": [
  {
    "type": "Microsoft.Cdn/profiles",
    "apiVersion": "2020-09-01",
    "name": "[parameters('profileName')]",
    "location": "[parameters('location')]",
    "sku": {
      "name": "[parameters('CDNSku')]"
    },
    "resources": [
      {
        "type": "endpoints",...

我的参数文件看起来像:

    "profileName": {
    "value": "GEN-UNIQUE"
}

那么如何正确设置资源(和/或资源组)? (我只尝试创建配置文件,因为没有这一步我找不到创建端点的示例)

【问题讨论】:

    标签: azure azure-template


    【解决方案1】:

    这有效(或至少没有错误):

    az deployment group create --resource-group myrg
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-02-18
      • 2015-01-02
      • 1970-01-01
      • 2016-09-23
      • 1970-01-01
      • 2016-09-11
      • 2019-08-08
      • 2020-03-18
      相关资源
      最近更新 更多