手臂模板Web应用发布配置文件 [英] arm template web app publish profile
问题描述
我正在使用ARM模板部署Web应用程序,需要获取发布配置文件作为输出 有没有办法做到这一点? 我看见了这个: azure模板输出发布配置文件内容
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
但是无法正常工作 我尝试使用reference和listKeys进行尝试,但所有属性都不是发布配置文件
But couldn't get it to work I tried both with reference and listKeys but none of the properties was the publish profile
谢谢
推荐答案
如果要获取列表函数可以做到这一点.
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
测试结果:
这篇关于手臂模板Web应用发布配置文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!