Skip to content

Apply access policies to different resource group #5785

Answered by brwilkinson
neoix asked this question in Q&A
Discussion options

You must be logged in to vote

I would recommend to move away from using accessPolicies all together.

There is a newer model, called RBAC.

Here is the guide.

https://docs.microsoft.com/en-us/azure/key-vault/general/rbac-guide?tabs=azurepowershell

if you are doing a Resource Group (RG) deployment, you don't need any scope (resource group works fine).

you can leverage this scope property to reference a keyvault in an alternate RG.

https://github.com/brwilkinson/AzureDeploymentFramework/blob/main/ADF/bicep/VM.bicep#L62

resource KV 'Microsoft.KeyVault/vaults@2021-06-01-preview' existing = {
  name: HubKVName
  scope: resourceGroup(HubKVRGName)
}

Replies: 1 comment 9 replies

Comment options

You must be logged in to vote
9 replies
@brwilkinson
Comment options

@neoix
Comment options

@brwilkinson
Comment options

@brwilkinson
Comment options

@neoix
Comment options

Answer selected by brwilkinson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants