我正在使用Azure模板来设置网站。我希望它输出发布配置文件的内容,以便我可以自动化部署。这可能吗?
我当前的模板看起来像这样:
{
...
"resources": [
{
"type": "Microsoft.Web/sites",
"kind": "app",
"name": "[variables('webapp').name]",
"apiVersion": "[variables('webapp').version]",
"location": "[variables('location')]",
"tags": {},
"properties": {
"serverFarmId": "[variables('webapp').serviceplan.name]",
"name": "[variables('webapp').name]"
},
"dependsOn": [
"[resourceId('Microsoft.Web/serverfarms', variables('webapp').serviceplan.name)]"
]
},
{
"type": "Microsoft.Web/serverfarms",
"sku": {
"name": "B1",
"tier": "Basic",
"size": "B1",
"family": "B",
"capacity": 1
},
"kind": "app",
"name": "[variables('webapp').serviceplan.name]",
"apiVersion": "[variables('webapp').serviceplan.version]",
"location": "[variables('location')]",
"properties": {
"name": "[variables('webapp').serviceplan.name]",
"numberOfWorkers": 1
},
"dependsOn": []
}
],
"outputs": {
"manifest": {
"type": "object",
"value": {
"Website": {
"publishUrl": "...",
"userPWD": "...",
"msdeploySite": "..."
}
}
}
}
}
我尝试过使用listkeys函数,但据我了解,您需要提供资源的ID,即发布您要获取的资料,我不知道如何获得该资源