File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
infrastructure/terraform/resource_group_init Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ var miGHtoADOname = 'mi-${appShortName}-${envConfig}-ghtoado-uks'
2828var roleID = {
2929 CDNContributor : 'ec156ff8-a8d1-4d15-830c-5b80698ca432'
3030 kvSecretsUser : '4633458b-17de-408a-b874-0445c86b69e6'
31+ monitoringContributor : '749f88d5-cbae-40b8-bcfc-e573ddc772fa'
3132 networkContributor : '4d97b98b-1d4f-4787-a291-c67834d212e7'
3233 rbacAdmin : 'f58310d9-a9f6-439a-9e8d-f62e7b41a168'
3334 reader : 'acdd72a7-3385-48ef-bd42-f606fba81ae7'
@@ -124,6 +125,16 @@ module storageAccountPrivateEndpoint 'privateEndpoint.bicep' = {
124125 }
125126}
126127
128+ // Let the managed identity manage monitoring resources (Application Insights, Log Analytics)
129+ resource monitoringContributorAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
130+ name : guid (subscription ().subscriptionId , envConfig , 'monitoringContributor' )
131+ properties : {
132+ roleDefinitionId : subscriptionResourceId ('Microsoft.Authorization/roleDefinitions' , roleID .monitoringContributor )
133+ principalId : managedIdentiyADOtoAZ .outputs .miPrincipalID
134+ description : '${miADOtoAZname } Monitoring Contributor access to subscription'
135+ }
136+ }
137+
127138// Let the managed identity configure vnet peering and DNS records
128139resource networkContributorAssignment 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
129140 name : guid (subscription ().subscriptionId , envConfig , 'networkContributor' )
You can’t perform that action at this time.
0 commit comments