arm template web app publish profile

六月ゝ 毕业季﹏ 提交于 2019-12-13 15:50:22

问题


I am deploying a web app using an ARM template and need to get the publish profile as an output Is there a way to do this? I saw this: azure template output publish profile content

But couldn't get it to work I tried both with reference and listKeys but none of the properties was the publish profile

Thanks


回答1:


If you want to get the publish Credentials, you could use the ARM template list function to do that.

"outputs": {
    "publishProfile": {
      "type": "object",
      "value": "[list(concat('Microsoft.Web/sites/', parameters('websisteName') ,'/config/publishingcredentials'), '2016-08-01')]"
    }

If you want to get the publish user or publish password, you could use the following code and change the type from object to string.

list(concat('Microsoft.Web/sites/', parameters('websisteName') ,'/config/publishingcredentials'), '2016-08-01').properties.publishingPassword

Test result:



来源:https://stackoverflow.com/questions/47536086/arm-template-web-app-publish-profile

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!