Reputation: 1277
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
Upvotes: 4
Views: 1914
Reputation: 24549
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:
Upvotes: 7