-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommon-resources.bicep
105 lines (87 loc) · 2.11 KB
/
common-resources.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
param name string
param defaultLocation string = resourceGroup().location
param tenantId string
param appServicePlanSku string = 'P1V2'
param sodaUserObjectId string
param addEmail bool = false
var abbrs = loadJsonContent('abbreviations.json')
resource keyVault 'Microsoft.KeyVault/vaults@2022-07-01' = {
name: '${abbrs.keyVaultVaults}${name}'
location: defaultLocation
properties: {
enableRbacAuthorization: false
sku: {
family: 'A'
name: 'standard'
}
tenantId: tenantId
accessPolicies: [
{
objectId: sodaUserObjectId
tenantId: tenantId
permissions: {
secrets: [
'all'
]
keys: [
'all'
]
certificates: [
'all'
]
}
}
]
}
// resource dataProtectionKey 'keys' = {
// name: 'dataprotection-key'
// properties: {
// keySize: 2048
// kty: 'RSA'
// }
// }
}
resource containerRegistry 'Microsoft.ContainerRegistry/registries@2022-02-01-preview' = {
name: '${abbrs.containerRegistryRegistries}${name}'
location: defaultLocation
sku: {
name: 'Basic'
}
}
resource appServicePlan 'Microsoft.Web/serverfarms@2022-03-01' = {
name: '${abbrs.webServerFarms}${name}'
location: defaultLocation
sku: {
name: appServicePlanSku
}
properties: {
reserved: true
}
}
resource logAnalyticsWorkspace 'Microsoft.OperationalInsights/workspaces@2020-03-01-preview' = {
name: '${abbrs.operationalInsightsWorkspaces}${name}'
location: defaultLocation
properties: any({
retentionInDays: 30
features: {
searchVersion: 1
}
sku: {
name: 'PerGB2018'
}
})
}
resource communicationServices 'Microsoft.Communication/communicationServices@2023-04-01-preview' = if(addEmail) {
name: 'acs-${name}'
location: defaultLocation
properties: {
dataLocation: 'Australia'
}
}
resource emailServices 'Microsoft.Communication/emailServices@2023-04-01-preview' = if(addEmail) {
name: 'aes-${name}'
location: 'global' //this must be set to global
properties: {
dataLocation: 'Australia'
}
}