Skip to content

Commit be911c7

Browse files
committed
Move role assignments outside of the keyvault resource
1 parent 23628ac commit be911c7

File tree

1 file changed

+9
-6
lines changed
  • {{cookiecutter.__src_folder_name}}/infra

1 file changed

+9
-6
lines changed

{{cookiecutter.__src_folder_name}}/infra/main.bicep

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,15 @@ module keyVault 'br/public:avm/res/key-vault/vault:0.6.2' = {
9494
nbf: 0
9595
}
9696
}]
97-
roleAssignments: [
98-
{
99-
principalId: web.outputs.SERVICE_WEB_IDENTITY_PRINCIPAL_ID
100-
roleDefinitionIdOrName: 'Key Vault Secrets User'
101-
}
102-
]
97+
98+
}
99+
}
100+
101+
module roleAssignment 'core/security/role.bicep' = {
102+
scope: resourceGroup
103+
params: {
104+
principalId: web.outputs.SERVICE_WEB_IDENTITY_PRINCIPAL_ID
105+
roleDefinitionId: '4633458b-17de-408a-b874-0445c86b69e6'
103106
}
104107
}
105108

0 commit comments

Comments
 (0)