@@ -59,6 +59,7 @@ var roleID = {
5959 rbacAdmin : 'f58310d9-a9f6-439a-9e8d-f62e7b41a168'
6060 reader : 'acdd72a7-3385-48ef-bd42-f606fba81ae7'
6161 contributor : 'b24988ac-6180-42a0-ab88-20f7382dd24c'
62+ storageBlobDataContributor : 'ba92f5b4-2d11-453d-a403-e96b0029c9fe'
6263}
6364
6465
@@ -182,7 +183,7 @@ resource CDNContributorAssignment 'Microsoft.Authorization/roleAssignments@2022-
182183 }
183184}
184185
185- @description ('Let the managed identity configure terraform' )
186+ @description ('Let the managed identity deploy terraform on the subscription ' )
186187resource TerraformContributorAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
187188 name : guid (subscription ().subscriptionId , hubType , 'TerraformContributor' )
188189 properties : {
@@ -192,6 +193,16 @@ resource TerraformContributorAssignment 'Microsoft.Authorization/roleAssignments
192193 }
193194}
194195
196+ @description ('Let the managed identity strore blobs in storage account' )
197+ resource StorageAccountBlobContributorAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
198+ name : guid (subscription ().subscriptionId , hubType , 'StorageAccountBlobContributorAssignment' )
199+ properties : {
200+ roleDefinitionId : subscriptionResourceId ('Microsoft.Authorization/roleDefinitions' , roleID .storageBlobDataContributor )
201+ principalId : managedIdentiyADOtoAZ .outputs .miPrincipalID
202+ description : '${miADOtoAZname } Storage Account Blob Contributor access to subscription'
203+ }
204+ }
205+
195206@description ('Create the managed identity assumed by Github actions to trigger Azure devops pipelines' )
196207module managedIdentiyGHtoADO 'modules/managedIdentity.bicep' = {
197208 scope : managedIdentityRG
0 commit comments