【发布时间】:2020-02-13 13:42:44
【问题描述】:
我有一个 Azure 模板,并且正在尝试部署两个额外的资源组。
{
"type": "Microsoft.Resources/resourceGroups",
"apiVersion": "2019-08-01",
"location": "eastus",
"name": "[variables('galleryResourceGroupName')]",
"properties": {}
},
{
"type": "Microsoft.Resources/resourceGroups",
"apiVersion": "2019-08-01",
"location": "[resourceGroup().location]",
"name": "[variables('tempResourceGroupName')]",
"properties": {}
},
当我运行这个模板时,这两个资源的结果是:
{ "message": "没有找到与请求 URI 匹配的 HTTP 资源 'https://management.azure.com/subscriptions/59b4b...9074/resourcegroups/rgMain/providers/Microsoft.Resources/resourceGroups/rgTemp?api-version=2019-08-01'。" }
未找到
文档说您可以部署资源组: https://docs.microsoft.com/en-us/azure/templates/microsoft.resources/2019-08-01/resourcegroups
但它不起作用... 任何想法为什么?
【问题讨论】:
-
你是如何部署这个模板的?
-
您需要使用完整的模板,而不是其中的一部分。见template。您需要将您的组放入资源中。
标签: azure azure-devops azure-template