This repository has been archived by the owner on Jun 13, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
main.bicep
94 lines (87 loc) · 2.97 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
targetScope = 'subscription'
// PARAMETERS
param resourceGroupName string = 'BicepExampleRG'
param resourceGrouplocation string = 'australiaeast'
param actionGroupName string = 'BicepExampleAG'
param actionGroupEnabled bool = true
param actionGroupShortName string = 'bicepag'
param actionGroupEmailName string = 'jloudon'
param actionGroupEmail string = '[email protected]'
param actionGroupAlertSchema bool = true
param assignmentEnforcementMode string = 'Default'
param assignmentIdentityLocation string = 'australiaeast'
param dcrResourceID string = '0123456789'
param policySource string = 'bicep-policy-examples'
param policyCategory string = 'Custom'
param nonComplianceMessageContactEmail string = '[email protected]'
param mandatoryTag1Key string = 'CostCentre'
param mandatoryTag1Value string = '123456'
// RESOURCES
module rg './other-resources/resourceGroups.bicep' = {
name: 'resourceGroups'
params: {
resourceGroupName: resourceGroupName
resourceGrouplocation: resourceGrouplocation
}
}
module ag './other-resources/actionGroups.bicep' = {
dependsOn: [
rg
]
scope: resourceGroup(resourceGroupName)
name: 'actionGroups'
params: {
actionGroupName: actionGroupName
actionGroupEnabled: actionGroupEnabled
actionGroupShortName: actionGroupShortName
actionGroupEmailName: actionGroupEmailName
actionGroupEmail: actionGroupEmail
actionGroupAlertSchema: actionGroupAlertSchema
}
}
module definitions './definitions/definitions.bicep' = {
name: 'definitions'
params: {
policySource: policySource
policyCategory: policyCategory
resourceGroupName: resourceGroupName
resourceGrouplocation: resourceGrouplocation
actionGroupName: ag.outputs.actionGroupName
actionGroupID: ag.outputs.actionGroupID
actionGroupEnabled: actionGroupEnabled
actionGroupShortName: actionGroupShortName
actionGroupEmailName: actionGroupEmailName
actionGroupEmail: actionGroupEmail
actionGroupAlertSchema: actionGroupAlertSchema
assignmentEnforcementMode: assignmentEnforcementMode
assignmentIdentityLocation: assignmentIdentityLocation
dcrResourceID: dcrResourceID
mandatoryTag1Key: mandatoryTag1Key
mandatoryTag1Value: mandatoryTag1Value
}
}
module initiatives './initiatives/initiatives.bicep' = {
name: 'initiatives'
params: {
policySource: policySource
policyCategory: policyCategory
monitoringGovernancePolicyIDs: [
definitions.outputs.policyID1
definitions.outputs.policyID2
]
tagGovernancePolicyIDs: [
definitions.outputs.policyID3
]
}
}
module assignments './assignments/assignments.bicep' = {
name: 'assignments'
params: {
policySource: policySource
assignmentIdentityLocation: assignmentIdentityLocation
assignmentEnforcementMode: assignmentEnforcementMode
nonComplianceMessageContactEmail: nonComplianceMessageContactEmail
monitoringGovernanceID: initiatives.outputs.monitoringGovernanceID
tagGovernanceID: initiatives.outputs.tagGovernanceID
}
}