Apply access policies to different resource group #5785
-
Hello everyone, My resources are deployed as follow:
I'm not able to add access policies to KeyVault (RG1) using the managed identity DataFactory (RG2). What should be my targetScope in this case? Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 9 replies
-
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)
} |
Beta Was this translation helpful? Give feedback.
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