问题
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