Add Azure Key Vault to Bicep infrastructure with managed identity access#6
Merged
workcontrolgit merged 1 commit intomasterfrom Apr 6, 2026
Merged
Add Azure Key Vault to Bicep infrastructure with managed identity access#6workcontrolgit merged 1 commit intomasterfrom
workcontrolgit merged 1 commit intomasterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
infra/modules/keyVault.bicep— provisionskv-talent-devwith Standard SKU, RBAC authorization, and soft-delete (7 days)infra/modules/webApp.bicep— enable system-assigned managed identity on all web apps; exposeprincipalIdoutputinfra/main.bicep— addkeyVaultNameparameter, wire Key Vault module with all three web app principal IDs (API, STS, Admin), addkeyVaultUrioutputinfra/parameters/dev.bicepparam— addkeyVaultName = 'kv-talent-dev'How it works
Each App Service gets a system-assigned managed identity. The Key Vault module grants the Key Vault Secrets User role to each identity, allowing apps to read secrets without storing credentials in config. Connection strings can then be stored as Key Vault secrets and referenced in App Service settings via the
@Microsoft.KeyVault(SecretUri=...)syntax.Test plan
az deployment group createwith updated Bicep to verify no deployment errorskv-talent-devKey Vault is created inrg-talent-dev