【发布时间】:2020-02-24 09:41:56
【问题描述】:
我有一个管道将使用 ARM 模板更新我的 Azure 资源组。在我的资源组中,我有一个 Linux 应用服务计划。当我的管道运行时,我收到以下错误:
2020-02-24T09:13:47.8665770Z ##[error]The template deployment 'template-20200224-091344-94a5' is not valid according to the validation procedure. The tracking id is 'cba7977a-ed1a-4807-a8bb-d7387bb9eae1'. See inner errors for details.
2020-02-24T09:13:47.8673575Z ##[error]Details:
2020-02-24T09:13:47.8683161Z ##[error]ValidationForResourceFailed: Validation failed for a resource. Check 'Error.Details[0]' for more information. [{"code":"FreeLinuxSkuNotAllowedInResourceGroup","message":"Cannot create a Linux app service plan because there is a limit of 1 free tier linux app service plan per subscription."}]
2020-02-24T09:13:47.8695096Z ##[error]Task failed while creating or updating the template deployment.
我认为管道应该只更新我的应用服务计划,但它似乎正在尝试创建一个新的。所以我想会发生什么是它创建一个新的,然后删除旧的。但是,它不能这样做,因为 Linux 应用服务计划限制为 1 个,并且已经存在一个。
所以我的问题是,我怎样才能让我的管道只覆盖旧的应用服务计划,而不是创建一个新的并删除旧的?
这里是ARM模板中的资源:
{
"type": "Microsoft.Web/serverfarms",
"apiVersion": "2018-02-01",
"name": "[parameters('serverfarms_project_api_name')]",
"location": "West Europe",
"tags": {
"Environment": "Dev"
},
"sku": {
"name": "F1",
"tier": "Free",
"size": "F1",
"family": "F",
"capacity": 1
},
"kind": "linux",
"properties": {
"perSiteScaling": false,
"maximumElasticWorkerCount": 1,
"isSpot": false,
"reserved": true,
"isXenon": false,
"hyperV": false,
"targetWorkerCount": 0,
"targetWorkerSizeId": 0
}
}
【问题讨论】:
标签: azure azure-devops