【发布时间】:2018-09-04 19:25:20
【问题描述】:
我一直在尝试将我的资源自动部署到 Azure 上的资源组。现在我正在使用 ARM 模板,到目前为止,我能够使用模板创建 App Insights 和 App Service Plan。看起来是这样的:
{
"apiVersion": "2015-05-01",
"name": "[variables('servicePlan')]",
"kind": "linux",
"type": "Microsoft.Web/serverfarms",
"location": "[resourceGroup().location]",
"tags": {
"displayName": "BTC Push Notification Settings HostingPlan"
},
"sku": {
"name": "[variables('skuNamePlan')]",
"capacity": "[variables('skuSizePlan')]"
},
"properties": {
"name": "[variables('servicePlan')]"
}
},
{
"apiVersion": "2015-05-01",
"name": "[variables('appInsights')]",
"type": "Microsoft.Insights/components",
"location": "southcentralus",
"tags": {
"[concat('hidden-link:', resourceGroup().id, '/providers/Microsoft.Web/sites/', variables('appInsights'))]": "Resource",
"displayName": "BTC Push Notification Settings App Insights"
},
"properties": {
"applicationId": "[variables('appInsights')]"
}
}
我很难为容器创建 Web 应用程序并使用 ARM 模板将其指向我的 docker 映像。我已经手动完成了它并且它有效,同样我通过azure-cli 完成它就像这个az webapp create --resource-group ExampleGroupAlpina --plan myAppServicePlan --name DockerContainer --deployment-container-image-name this-is-my-image/sample-docker 并且它也有效。如果有人能建议使用 ARM 模板为容器创建这个 Web 应用程序,我将不胜感激。
【问题讨论】:
-
如果可能的话,你可以接受并且答案是正确的,以便答案可以帮助其他正在寻找它的人。
标签: json azure arm-template