azure-docs
azure-docs copied to clipboard
Running locally?
How would one conditionally bypass this behaviour based on environment, so that the function still works when run locally, on the development machine?
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
- ID: 7feaa3d0-7233-a3cb-cb9b-a9a55b1f0d7a
- Version Independent ID: f41f9d51-52f8-1f45-1043-1344a3b74458
- Content: Key Vault references - Azure App Service
- Content Source: articles/app-service/app-service-key-vault-references.md
- Service: app-service
- GitHub Login: @mattchenderson
- Microsoft Alias: mahender
Hi @TWolverson , thanks for the feedback! We are currently investigating and will update you shortly.
@TWolverson keep in mind that Key Vault references are currently in preview. With future improvements, you may be able to bypass this behavior. Assigning this to the author to evaluate and update this documentation as appropriate.
Hi, I had been following this Article and code snippets provided here, and I had few doubts: I can't really figure out how the SecretURI is created through this snippet: "APPINSIGHTS_INSTRUMENTATIONKEY": "[concat('@Microsoft.KeyVault(SecretUri=', reference(variables('appInsightsKeyResourceId')).secretUriWithVersion, ')')]",
I cant really find where this appInsightsKeyResourceId is declared and what kind of resource this is. Second thing is if I really would want to use the alternate approach as described below: VaultName=vaultName;SecretName=secretName;SecretVersion=secretVersion - The VaultName should the name of your Key Vault resource. The SecretName should be the name of the target secret. The SecretVersion should be the version of the secret to use.
How can I get the Secret Version of a secret I created inside the ARM Template. Please help me to figure this out.
How to check if you made any errors adding a reference? A preview of the value online would be helpful to check everything is working as expected.
@MaartenArits, thanks for your response, I was able to figure this out. But I got another problem, I want to create the Key Value Secret conditionally means there is couple of values which will be passed from PS to ARM Template execution when the deployment runs for first time, but for next deployment I want the Secrets not to be created, basically I expect to see idempotent behavior being enforced. I want something like below. But the template fails in execution. { "condition": "[not(equals(toLower(parameters('param1')), variables('kvIdentifier')))]", "type": "Microsoft.KeyVault/vaults/secrets", "name": "[concat(variables('keyVaultName'), '/', variables('var1'))]", "apiVersion": "[variables('keyVault-apiversion')]", "properties": { "value": "[parameters('qnaKnowledgebaseId_Investor')]", "attributes": { "enabled": true } }, "dependsOn": [ "[resourceId('Microsoft.KeyVault/vaults', variables('keyVaultName'))]" ] },
#please close as this question has remained stale since 2019.
#please-close