File tree Expand file tree Collapse file tree
tests/integration/all-resource-types Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -117,7 +117,8 @@ resource keyVault 'Microsoft.KeyVault/vaults@2023-07-01' = {
117117 name : 'standard'
118118 }
119119 tenantId : subscription ().tenantId
120- enableRbacAuthorization : true
120+ enableRbacAuthorization : false
121+ accessPolicies : []
121122 enableSoftDelete : true
122123 softDeleteRetentionInDays : 7
123124 }
@@ -151,14 +152,19 @@ resource apim 'Microsoft.ApiManagement/service@2025-09-01-preview' = {
151152 }
152153}
153154
154- // Grant APIM identity Key Vault Secrets User role for NamedValue KV ref
155- resource kvRoleAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
156- name : guid (keyVault .id , apim .id , '4633458b-17de-408a-b874-0445c86b69e6' )
157- scope : keyVault
155+ resource kvAccessPolicy 'Microsoft.KeyVault/vaults/accessPolicies@2023-07-01' = {
156+ name : 'add'
157+ parent : keyVault
158158 properties : {
159- roleDefinitionId : subscriptionResourceId ('Microsoft.Authorization/roleDefinitions' , '4633458b-17de-408a-b874-0445c86b69e6' )
160- principalId : apim .identity .principalId
161- principalType : 'ServicePrincipal'
159+ accessPolicies : [
160+ {
161+ tenantId : subscription ().tenantId
162+ objectId : apim .identity .principalId
163+ permissions : {
164+ secrets : ['get' ]
165+ }
166+ }
167+ ]
162168 }
163169}
164170
You can’t perform that action at this time.
0 commit comments