-
Notifications
You must be signed in to change notification settings - Fork 5
/
main.bicep
639 lines (601 loc) · 19.1 KB
/
main.bicep
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
// AzureDignosticSettings
// v-2.0.0
// *See README file for usage information
// *This bicep template will generate Log Analytics Ingest charges.
//Scope
targetScope = 'managementGroup'
//Parameters
param loganalyticsregion string
param loganalytics1rid string
param loganalytics2rid string
param loganalytics3rid string
param nsgflowlogworkspaceid string
param mgmtsubscription string
param mgmtresourcegroup string
param deploytier2 bool
param deploytier3 bool
//Variables
var managementgroup = tenant().tenantId
//Modules
//This module deploys the Azure Diagnostic Resource Group.
module azdsresourcegroup './resourcegroup.bicep' = {
name: 'AZDSResourceGroups'
scope:subscription(mgmtsubscription)
params:{
loganalyticsregion: loganalyticsregion
mgmtresourcegroup: mgmtresourcegroup
}
}
//This module deploys the Azure Diagnostic Managed Identity.
module azdsmanagedidentity './managedid.bicep' = {
name: 'AZDSUserManagedIdentity'
scope: resourceGroup('${mgmtsubscription}', '${mgmtresourcegroup}')
params:{
loganalyticsregion:loganalyticsregion
}
dependsOn: [
azdsresourcegroup
]
}
//This module deploys the Azure Diagnostic Role Assignments.
module azdsroleassignment './roleassign.bicep' = {
name: 'AZDSRoleAssignment'
scope: managementGroup(managementgroup)
params:{
principalId:azdsmanagedidentity.outputs.miresourcepid
automationaccountpid:azdsmanagedidentity.outputs.automationaccountpid
}
}
//This module deploys the Azure Diagnostic Data Collection Rules.
module azdsdcr './dcr.bicep' = {
name: 'AZDSDataCollectionRule'
scope: resourceGroup('${mgmtsubscription}', '${mgmtresourcegroup}')
params:{
loganalyticsregion: loganalyticsregion
loganalytics1rid: loganalytics1rid
loganalytics2rid: loganalytics2rid
azdsumiid: azdsmanagedidentity.outputs.mirid
}
dependsOn: [
azdsroleassignment
]
}
//This module deploys the DCR Azure Policies.
module azdsazpolicy './policy.bicep' = {
name: 'AZDSAzurePolicy'
scope: managementGroup(managementgroup)
params:{
loganalyticsregion: loganalyticsregion
azmanagedidentity: azdsmanagedidentity.outputs.mirid
mgmtresourcegroup: mgmtresourcegroup
muasminame: azdsmanagedidentity.outputs.mirname
linuxdcrid: azdsdcr.outputs.mdcdcrid02
commondcrid: azdsdcr.outputs.mdcdcrid01
vmiid: azdsdcr.outputs.mdcdcrid03
}
dependsOn: [
azdsroleassignment
]
}
//This module deploys the Activation script.
module azdsdeploymentscript './activation.bicep' = {
name: 'AZDSDeploymentScript'
scope: resourceGroup('${mgmtsubscription}', '${mgmtresourcegroup}')
params:{
location: loganalyticsregion
azdsumiid: azdsmanagedidentity.outputs.mirid
}
dependsOn: [
azdsmanagedidentity
azdsdcr
azdsazpolicy
azactivitydeploy
azkvdeploy
azbasdeploy
azrsvdeploy
azacrdeploy
azagdeploy
azfddeploy
azfwdeploy
aznsgdeploy
aznsgflowdeploy
azautodeploy
]
}
//ARM Templates
//Tier 1 - Required for production workloads
//This module deploys the Entra Diagnostic settings.
module entradiag './tier1/entra.bicep' = {
name: 'AZDSEntraIDDiagnosticSettings'
scope: tenant()
params:{
laworkspacerid: loganalytics1rid
}
}
//This deploy Azure Activity Diagnostic Settings.
var AZDS_AzActivity = json(loadTextContent('./tier1/AZDS_AzActivity.json'))
resource azactivitypolicy 'Microsoft.Authorization/policyDefinitions@2023-04-01' = {
name: 'AZDS_AzActivity'
properties: AZDS_AzActivity.properties
}
module azactivitydeploy './polassign.bicep' = {
name: 'AZDS_AzActivityDeployment'
scope: managementGroup(managementgroup)
params:{
policyassignname: 'AZDS_AzActivity'
policydefinitionid: azactivitypolicy.id
policydescription: azactivitypolicy.properties.description
azdsumiid: azdsmanagedidentity.outputs.mirid
loganalyticsregion: loganalyticsregion
loganalyticsrid: loganalytics1rid
}
dependsOn: [
azactivitypolicy
]
}
//This deploys AKS Diagnostic Settings.
var AZDS_AKST1 = json(loadTextContent('./tier1/AZDS_AKS.json'))
resource akst1policy 'Microsoft.Authorization/policyDefinitions@2023-04-01' = {
name: 'AZDS_AKST1'
properties: AZDS_AKST1.properties
}
module azaksdeploy './polassign.bicep' = {
name: 'AZDS_AKST1Deployment'
scope: managementGroup(managementgroup)
params:{
policyassignname: 'AZDS_AKST1'
policydefinitionid: akst1policy.id
policydescription: akst1policy.properties.description
azdsumiid: azdsmanagedidentity.outputs.mirid
loganalyticsregion: loganalyticsregion
loganalyticsrid: loganalytics1rid
}
dependsOn: [
akst1policy
]
}
//This deploys Key Vault Diagnostic Settings.
var AZDS_KV = json(loadTextContent('./tier1/AZDS_KV.json'))
resource kvpolicy 'Microsoft.Authorization/policyDefinitions@2023-04-01' = {
name: 'AZDS_KV'
properties: AZDS_KV.properties
}
module azkvdeploy './polassign.bicep' = {
name: 'AZDS_KVDeployment'
scope: managementGroup(managementgroup)
params:{
policyassignname: 'AZDS_KV'
policydefinitionid: kvpolicy.id
policydescription: kvpolicy.properties.description
azdsumiid: azdsmanagedidentity.outputs.mirid
loganalyticsregion: loganalyticsregion
loganalyticsrid: loganalytics1rid
}
dependsOn: [
kvpolicy
]
}
//This deploys Bastion Diagnostic Settings.
var AZDS_BAS = json(loadTextContent('./tier1/AZDS_BAS.json'))
resource baspolicy 'Microsoft.Authorization/policyDefinitions@2023-04-01' = {
name: 'AZDS_BAS'
properties: AZDS_BAS.properties
}
module azbasdeploy './polassign.bicep' = {
name: 'AZDS_BASDeployment'
scope: managementGroup(managementgroup)
params:{
policyassignname: 'AZDS_BAS'
policydefinitionid: baspolicy.id
policydescription: baspolicy.properties.description
azdsumiid: azdsmanagedidentity.outputs.mirid
loganalyticsregion: loganalyticsregion
loganalyticsrid: loganalytics1rid
}
dependsOn: [
baspolicy
]
}
//This deploys Recovery Vault Diagnostic Settings.
var AZDS_RSV = json(loadTextContent('./tier1/AZDS_RSV.json'))
resource rsvpolicy 'Microsoft.Authorization/policyDefinitions@2023-04-01' = {
name: 'AZDS_RSV'
properties: AZDS_RSV.properties
}
module azrsvdeploy './polassign.bicep' = {
name: 'AZDS_RSVDeployment'
scope: managementGroup(managementgroup)
params:{
policyassignname: 'AZDS_RSV'
policydefinitionid: rsvpolicy.id
policydescription: rsvpolicy.properties.description
azdsumiid: azdsmanagedidentity.outputs.mirid
loganalyticsregion: loganalyticsregion
loganalyticsrid: loganalytics1rid
}
dependsOn: [
rsvpolicy
]
}
//This deploys Container Registry Diagnostic Settings.
var AZDS_ACR = json(loadTextContent('./tier1/AZDS_ACR.json'))
resource acrpolicy 'Microsoft.Authorization/policyDefinitions@2023-04-01' = {
name: 'AZDS_ACR'
properties: AZDS_ACR.properties
}
module azacrdeploy './polassign.bicep' = {
name: 'AZDS_ACRDeployment'
scope: managementGroup(managementgroup)
params:{
policyassignname: 'AZDS_ACR'
policydefinitionid: acrpolicy.id
policydescription: acrpolicy.properties.description
azdsumiid: azdsmanagedidentity.outputs.mirid
loganalyticsregion: loganalyticsregion
loganalyticsrid: loganalytics1rid
}
dependsOn: [
acrpolicy
]
}
//This deploys Azure Automation Diagnostic Settings.
var AZDS_Auto = json(loadTextContent('./tier1/AZDS_Auto.json'))
resource autopolicy 'Microsoft.Authorization/policyDefinitions@2023-04-01' = {
name: 'AZDS_Auto'
properties: AZDS_Auto.properties
}
module azautodeploy './polassign.bicep' = {
name: 'AZDS_AutoDeployment'
scope: managementGroup(managementgroup)
params:{
policyassignname: 'AZDS_Auto'
policydefinitionid: autopolicy.id
policydescription: autopolicy.properties.description
azdsumiid: azdsmanagedidentity.outputs.mirid
loganalyticsregion: loganalyticsregion
loganalyticsrid: loganalytics1rid
}
dependsOn: [
autopolicy
]
}
//Tier 2 - Recommended for production workloads
//This deploys App Gateway Diagnostic Settings.
var AZDS_AG = json(loadTextContent('./tier2/AZDS_AG.json'))
resource agpolicy 'Microsoft.Authorization/policyDefinitions@2023-04-01' = if (deploytier2) {
name: 'AZDS_AG'
properties: AZDS_AG.properties
}
module azagdeploy './polassign.bicep' = if (deploytier2) {
name: 'AZDS_AGDeployment'
scope: managementGroup(managementgroup)
params:{
policyassignname: 'AZDS_AG'
policydefinitionid: agpolicy.id
policydescription: agpolicy.properties.description
azdsumiid: azdsmanagedidentity.outputs.mirid
loganalyticsregion: loganalyticsregion
loganalyticsrid: loganalytics1rid
}
dependsOn: [
agpolicy
]
}
//This deploys Front Door Diagnostic Settings.
var AZDS_FD = json(loadTextContent('./tier2/AZDS_FD.json'))
resource fdpolicy 'Microsoft.Authorization/policyDefinitions@2023-04-01' = if (deploytier2) {
name: 'AZDS_FD'
properties: AZDS_FD.properties
}
module azfddeploy './polassign.bicep' = if (deploytier2) {
name: 'AZDS_FDDeployment'
scope: managementGroup(managementgroup)
params:{
policyassignname: 'AZDS_FD'
policydefinitionid: fdpolicy.id
policydescription: fdpolicy.properties.description
azdsumiid: azdsmanagedidentity.outputs.mirid
loganalyticsregion: loganalyticsregion
loganalyticsrid: loganalytics1rid
}
dependsOn: [
fdpolicy
]
}
//This deploys Firewall Diagnostic Settings.
var AZDS_Firewall = json(loadTextContent('./tier2/AZDS_Firewall.json'))
resource fwpolicy 'Microsoft.Authorization/policyDefinitions@2023-04-01' = if (deploytier2) {
name: 'AZDS_Firewall'
properties: AZDS_Firewall.properties
}
module azfwdeploy './polassign.bicep' = if (deploytier2) {
name: 'AZDS_FWDeployment'
scope: managementGroup(managementgroup)
params:{
policyassignname: 'AZDS_Firewall'
policydefinitionid: fwpolicy.id
policydescription: fwpolicy.properties.description
azdsumiid: azdsmanagedidentity.outputs.mirid
loganalyticsregion: loganalyticsregion
loganalyticsrid: loganalytics1rid
}
dependsOn: [
fwpolicy
]
}
//This deploys Network Security Group Diagnostic Settings.
var AZDS_NSG = json(loadTextContent('./tier2/AZDS_NSG.json'))
resource nsgpolicy 'Microsoft.Authorization/policyDefinitions@2023-04-01' = if (deploytier2) {
name: 'AZDS_NSG'
properties: AZDS_NSG.properties
}
module aznsgdeploy './polassign.bicep' = if (deploytier2) {
name: 'AZDS_NSGDeployment'
scope: managementGroup(managementgroup)
params:{
policyassignname: 'AZDS_NSG'
policydefinitionid: nsgpolicy.id
policydescription: nsgpolicy.properties.description
azdsumiid: azdsmanagedidentity.outputs.mirid
loganalyticsregion: loganalyticsregion
loganalyticsrid: loganalytics1rid
}
dependsOn: [
nsgpolicy
]
}
//This deploys NSG Flow Logs.
var AZDS_NSGFLOW = json(loadTextContent('./tier2/AZDS_NSGFLOW.json'))
resource nsgflowpolicy 'Microsoft.Authorization/policyDefinitions@2023-04-01' = if (deploytier2) {
name: 'AZDS_NSGFLOW'
properties: AZDS_NSGFLOW.properties
}
module aznsgflowdeploy './ntaassign.bicep' = if (deploytier2) {
name: 'AZDS_NSGFLOWDeployment'
scope: managementGroup(managementgroup)
params:{
policyassignname: 'AZDS_NSGFLOW'
policydefinitionid: nsgflowpolicy.id
policydescription: nsgflowpolicy.properties.description
azdsumiid: azdsmanagedidentity.outputs.mirid
loganalyticsregion: loganalyticsregion
loganalyticsrid: loganalytics1rid
nsgflowlogworkspaceid: nsgflowlogworkspaceid
ntastorageid: azdsmanagedidentity.outputs.stntaflowid
}
dependsOn: [
nsgflowpolicy
]
}
//Tier 3 - Recommended for Azure Forensics
//This deploys API Gateway Diagnostic Settings.
var AZDS_APIM = json(loadTextContent('./tier3/AZDS_APIM.json'))
resource apimpolicy 'Microsoft.Authorization/policyDefinitions@2023-04-01' = if (deploytier3) {
name: 'AZDS_APIM'
properties: AZDS_APIM.properties
}
module azapimdeploy './polassign.bicep' = if (deploytier3) {
name: 'AZDS_APIMDeployment'
scope: managementGroup(managementgroup)
params:{
policyassignname: 'AZDS_APIM'
policydefinitionid: apimpolicy.id
policydescription: apimpolicy.properties.description
azdsumiid: azdsmanagedidentity.outputs.mirid
loganalyticsregion: loganalyticsregion
loganalyticsrid: loganalytics3rid
}
dependsOn: [
apimpolicy
]
}
//This deploys App Service Diagnostic Settings.
var AZDS_AppService = json(loadTextContent('./tier3/AZDS_AppService.json'))
resource appservicepolicy 'Microsoft.Authorization/policyDefinitions@2023-04-01' = if (deploytier3) {
name: 'AZDS_AppService'
properties: AZDS_AppService.properties
}
module azappservicedeploy './polassign.bicep' = if (deploytier3) {
name: 'AZDS_AppServiceDeployment'
scope: managementGroup(managementgroup)
params:{
policyassignname: 'AZDS_AppService'
policydefinitionid: appservicepolicy.id
policydescription: appservicepolicy.properties.description
azdsumiid: azdsmanagedidentity.outputs.mirid
loganalyticsregion: loganalyticsregion
loganalyticsrid: loganalytics3rid
}
dependsOn: [
appservicepolicy
]
}
//This deploys CosmosDB Diagnostic Settings.
var AZDS_CosmosDB = json(loadTextContent('./tier3/AZDS_CosmosDB.json'))
resource cosmosdbpolicy 'Microsoft.Authorization/policyDefinitions@2023-04-01' = if (deploytier3) {
name: 'AZDS_CosmosDB'
properties: AZDS_CosmosDB.properties
}
module azcosmosdbdeploy './polassign.bicep' = if (deploytier3) {
name: 'AZDS_CosmosDBDeployment'
scope: managementGroup(managementgroup)
params:{
policyassignname: 'AZDS_CosmosDB'
policydefinitionid: cosmosdbpolicy.id
policydescription: cosmosdbpolicy.properties.description
azdsumiid: azdsmanagedidentity.outputs.mirid
loganalyticsregion: loganalyticsregion
loganalyticsrid: loganalytics3rid
}
dependsOn: [
cosmosdbpolicy
]
}
//This deploys Function Diagnostic Settings.
var AZDS_Func = json(loadTextContent('./tier3/AZDS_Func.json'))
resource funcpolicy 'Microsoft.Authorization/policyDefinitions@2023-04-01' = if (deploytier3) {
name: 'AZDS_Func'
properties: AZDS_Func.properties
}
module azfuncdeploy './polassign.bicep' = if (deploytier3) {
name: 'AZDS_FuncDeployment'
scope: managementGroup(managementgroup)
params:{
policyassignname: 'AZDS_Func'
policydefinitionid: funcpolicy.id
policydescription: funcpolicy.properties.description
azdsumiid: azdsmanagedidentity.outputs.mirid
loganalyticsregion: loganalyticsregion
loganalyticsrid: loganalytics3rid
}
dependsOn: [
funcpolicy
]
}
//This deploys Logic App Diagnostic Settings.
var AZDS_LA= json(loadTextContent('./tier3/AZDS_LA.json'))
resource lapolicy 'Microsoft.Authorization/policyDefinitions@2023-04-01' = if (deploytier3) {
name: 'AZDS_LA'
properties: AZDS_LA.properties
}
module azladeploy './polassign.bicep' = {
name: 'AZDS_LA'
scope: managementGroup(managementgroup)
params:{
policyassignname: 'AZDS_LA'
policydefinitionid: lapolicy.id
policydescription: lapolicy.properties.description
azdsumiid: azdsmanagedidentity.outputs.mirid
loganalyticsregion: loganalyticsregion
loganalyticsrid: loganalytics3rid
}
dependsOn: [
lapolicy
]
}
//This deploys Public IP Diagnostic Settings.
var AZDS_PIP = json(loadTextContent('./tier3/AZDS_PIP.json'))
resource pippolicy 'Microsoft.Authorization/policyDefinitions@2023-04-01' = if (deploytier3) {
name: 'AZDS_PIP'
properties: AZDS_PIP.properties
}
module azpipdeploy './polassign.bicep' = {
name: 'AZDS_PIPDeployment'
scope: managementGroup(managementgroup)
params:{
policyassignname: 'AZDS_PIP'
policydefinitionid: pippolicy.id
policydescription: pippolicy.properties.description
azdsumiid: azdsmanagedidentity.outputs.mirid
loganalyticsregion: loganalyticsregion
loganalyticsrid: loganalytics3rid
}
dependsOn: [
pippolicy
]
}
//This deploys SQL Diagnostic Settings.
var AZDS_SQL = json(loadTextContent('./tier3/AZDS_SQL.json'))
resource sqlpolicy 'Microsoft.Authorization/policyDefinitions@2023-04-01' = if (deploytier3) {
name: 'AZDS_SQL'
properties: AZDS_SQL.properties
}
module azsqldeploy './polassign.bicep' = if (deploytier3) {
name: 'AZDS_SQLDeployment'
scope: managementGroup(managementgroup)
params:{
policyassignname: 'AZDS_SQL'
policydefinitionid: sqlpolicy.id
policydescription: sqlpolicy.properties.description
azdsumiid: azdsmanagedidentity.outputs.mirid
loganalyticsregion: loganalyticsregion
loganalyticsrid: loganalytics3rid
}
dependsOn: [
sqlpolicy
]
}
//This deploys SQL Managed Instance Diagnostic Settings.
var AZDS_SQLM = json(loadTextContent('./tier3/AZDS_SQLM.json'))
resource sqlmpolicy 'Microsoft.Authorization/policyDefinitions@2023-04-01' = if (deploytier3) {
name: 'AZDS_SQLM'
properties: AZDS_SQLM.properties
}
module azsqlmdeploy './polassign.bicep' = if (deploytier3) {
name: 'AZDS_SQLMDeployment'
scope: managementGroup(managementgroup)
params:{
policyassignname: 'AZDS_SQLM'
policydefinitionid: sqlmpolicy.id
policydescription: sqlmpolicy.properties.description
azdsumiid: azdsmanagedidentity.outputs.mirid
loganalyticsregion: loganalyticsregion
loganalyticsrid: loganalytics3rid
}
dependsOn: [
sqlmpolicy
]
}
//This deploys Storage Diagnostic Settings.
var AZDS_Storage = json(loadTextContent('./tier3/AZDS_Storage.json'))
resource storagepolicy 'Microsoft.Authorization/policyDefinitions@2023-04-01' = if (deploytier3) {
name: 'AZDS_Storage'
properties: AZDS_Storage.properties
}
module azstoragedeploy './polassign.bicep' = if (deploytier3) {
name: 'AZDS_StorageDeployment'
scope: managementGroup(managementgroup)
params:{
policyassignname: 'AZDS_Storage'
policydefinitionid: storagepolicy.id
policydescription: storagepolicy.properties.description
azdsumiid: azdsmanagedidentity.outputs.mirid
loganalyticsregion: loganalyticsregion
loganalyticsrid: loganalytics3rid
}
dependsOn: [
storagepolicy
]
}
//This deploys Application Insights Diagnostic Settings.
var AZDS_APPI = json(loadTextContent('./tier3/AZDS_APPI.json'))
resource appipolicy 'Microsoft.Authorization/policyDefinitions@2023-04-01' = if (deploytier3) {
name: 'AZDS_APPI'
properties: AZDS_APPI.properties
}
module azappideploy './polassign.bicep' = if (deploytier3) {
name: 'AZDS_APPIDeployment'
scope: managementGroup(managementgroup)
params:{
policyassignname: 'AZDS_APPI'
policydefinitionid: appipolicy.id
policydescription: appipolicy.properties.description
azdsumiid: azdsmanagedidentity.outputs.mirid
loganalyticsregion: loganalyticsregion
loganalyticsrid: loganalytics3rid
}
dependsOn: [
appipolicy
]
}
//This deploys AKS Diagnostic Settings.
var AZDS_AKST3 = json(loadTextContent('./tier3/AZDS_AKS.json'))
resource akst3policy 'Microsoft.Authorization/policyDefinitions@2023-04-01' = {
name: 'AZDS_AKST3'
properties: AZDS_AKST3.properties
}
module azakst3deploy './polassign.bicep' = {
name: 'AZDS_AKST3Deployment'
scope: managementGroup(managementgroup)
params:{
policyassignname: 'AZDS_AKST3'
policydefinitionid: akst3policy.id
policydescription: akst3policy.properties.description
azdsumiid: azdsmanagedidentity.outputs.mirid
loganalyticsregion: loganalyticsregion
loganalyticsrid: loganalytics1rid
}
dependsOn: [
akst3policy
]
}