How to output secret uri in ARM template?

穿精又带淫゛_ 提交于 2020-08-03 02:27:19

问题


I am unable to output the secret URI from my secret resource in my ARM template. Any ideas on how to do that?


回答1:


If you mean you want to have it from the KeyVault, try this:

"outputs":{
"mySecretUri": {
  "type": "string",
  "value": "[reference(resourceId('Microsoft.KeyVault/vaults/secrets', parameters('keyVaultName'), parameters('mySecretName'))).secretUri]"
}
}



回答2:


In my case the secret is a generated value which changes with every ARM deployment.

This requires the specification of the secrets' version number:

"value": "[reference(resourceId('Microsoft.KeyVault/vaults/secrets', parameters('vaultName'), parameters('secrets_secretName'))).secretUriWithVersion]"


来源:https://stackoverflow.com/questions/42158208/how-to-output-secret-uri-in-arm-template

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