arm 模板 Web 应用程序发布配置文件 [英] arm template web app publish profile

查看:37
本文介绍了arm 模板 Web 应用程序发布配置文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 ARM 模板部署 Web 应用程序,需要获取发布配置文件作为输出有没有办法做到这一点?我看见了这个:

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

解决方案

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:

这篇关于arm 模板 Web 应用程序发布配置文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆