我正在使用 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,即发布配置文件,但我不确定如何获取。