Skip to content

Commit f8fb19e

Browse files
committed
Added Mail Notification flags to bicep templates
1 parent 3ac4522 commit f8fb19e

File tree

5 files changed

+56
-13
lines changed

5 files changed

+56
-13
lines changed

Deployment/commonResources.bicep

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ param managedResourceGroupName string
99
param appConfigurationName string
1010
param authenticationType string
1111
param setRBACPermissions bool
12+
param skipMailNotifications bool
13+
param isMailApplicationPermissionGranted bool
1214

1315
// prereqs parameters
1416
// parameters for prereqs key vault
@@ -97,6 +99,8 @@ module dataResources 'dataResources.bicep' = {
9799
sqlSkuTier: sqlSkuTier
98100
tenantId: tenantId
99101
authenticationType: authenticationType
102+
skipMailNotifications: skipMailNotifications
103+
isMailApplicationPermissionGranted: isMailApplicationPermissionGranted
100104
}
101105
dependsOn: [
102106
prereqResources

Deployment/dataResources.bicep

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ param sqlSkuName string
1212
param sqlSkuTier string
1313
param tenantId string
1414
param authenticationType string
15+
param skipMailNotifications bool
16+
param isMailApplicationPermissionGranted bool
1517

1618
//data resources
1719
module dataInfrastructureTemplate '../Infrastructure/data/template.bicep' = {
@@ -31,5 +33,7 @@ module dataInfrastructureTemplate '../Infrastructure/data/template.bicep' = {
3133
sqlSkuTier: sqlSkuTier
3234
tenantId: tenantId
3335
authenticationType: authenticationType
36+
skipMailNotifications: skipMailNotifications
37+
isMailApplicationPermissionGranted: isMailApplicationPermissionGranted
3438
}
3539
}

Deployment/localTemplate.bicep

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ param setRBACPermissions bool = true
1616
'Certificate'
1717
])
1818
param authenticationType string
19+
param skipMailNotifications bool = false
20+
param isMailApplicationPermissionGranted bool = false
21+
1922
// prereqs parameters
2023
// parameters for prereqs key vault
2124
@secure()
@@ -111,6 +114,8 @@ module gmmResources 'commonResources.bicep' = {
111114
appConfigurationName: appConfigurationName
112115
authenticationType: authenticationType
113116
setRBACPermissions: setRBACPermissions
117+
skipMailNotifications: skipMailNotifications
118+
isMailApplicationPermissionGranted: isMailApplicationPermissionGranted
114119
}
115120
dependsOn: [
116121
gmmResourceGroups

Deployment/parameters.json

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
33
"contentVersion": "1.0.0.0",
44
"parameters": {
5+
"skipMailNotifications": {
6+
"value": false,
7+
"metadata": {
8+
"description": "If you don't want to send email notifications set this to true. When this is true, 'senderUsername','senderPassword','supportEmailAddresses','syncDisabledCCEmailAddresses','syncCompletedCCEmailAddresses' should be set to 'not-set'."
9+
}
10+
},
11+
"isMailApplicationPermissionGranted": {
12+
"value": false,
13+
"metadata": {
14+
"description": "If you are not able or don't want to use delegated Mail.Send permission, you can grant application permission Mail.Send to the <solution>-Graph-<environment> or <solution>-identity-<environment>-Graph application depending on the authentication type selected. Then set this parameter to true."
15+
}
16+
},
517
"senderUsername": {
618
"value": "",
719
"metadata": {
@@ -14,40 +26,40 @@
1426
"description": "The password of the user that will be used to send emails."
1527
}
1628
},
17-
"teamsChannelServiceAccountObjectId": {
29+
"supportEmailAddresses": {
1830
"value": "",
1931
"metadata": {
20-
"description": "The object id of the service account that will be used to manage Teams channels."
32+
"description": "The email addresses of the users that will receive support emails."
2133
}
2234
},
23-
"teamsChannelServiceAccountUsername": {
35+
"syncDisabledCCEmailAddresses": {
2436
"value": "",
2537
"metadata": {
26-
"description": "The username of the service account that will be used to manage Teams channels."
38+
"description": "The email addresses of the users that will receive emails when a sync job is disabled."
2739
}
2840
},
29-
"teamsChannelServiceAccountPassword": {
41+
"syncCompletedCCEmailAddresses": {
3042
"value": "",
3143
"metadata": {
32-
"description": "The password of the service account that will be used to manage Teams channels."
44+
"description": "The email addresses of the users that will receive emails when a sync job is completed."
3345
}
3446
},
35-
"supportEmailAddresses": {
47+
"teamsChannelServiceAccountObjectId": {
3648
"value": "",
3749
"metadata": {
38-
"description": "The email addresses of the users that will receive support emails."
50+
"description": "The object id of the service account that will be used to manage Teams channels."
3951
}
4052
},
41-
"syncDisabledCCEmailAddresses": {
53+
"teamsChannelServiceAccountUsername": {
4254
"value": "",
4355
"metadata": {
44-
"description": "The email addresses of the users that will receive emails when a sync job is disabled."
56+
"description": "The username of the service account that will be used to manage Teams channels."
4557
}
4658
},
47-
"syncCompletedCCEmailAddresses": {
59+
"teamsChannelServiceAccountPassword": {
4860
"value": "",
4961
"metadata": {
50-
"description": "The email addresses of the users that will receive emails when a sync job is completed."
62+
"description": "The password of the service account that will be used to manage Teams channels."
5163
}
5264
},
5365
"location": {
@@ -175,7 +187,7 @@
175187
"authenticationType": {
176188
"value": "UserAssignedManagedIdentity|ClientSecret|Certificate",
177189
"metadata": {
178-
"description": "The type of authentication to use for the App Configuration. UserAssignedManagedIdentity is recommended."
190+
"description": "The type of authentication to use for the App Configuration. UserAssignedManagedIdentity is recommended and will use <solution>-identity-<environment>-Graph. ClientSecret and Certificate will use <solution>-Graph-<environment>."
179191
}
180192
},
181193
"pipeline": {

Infrastructure/data/template.bicep

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,8 @@ param logAnalyticsSku string = 'PerGB2018'
145145
'Certificate'
146146
])
147147
param authenticationType string = 'ClientSecret'
148+
param skipMailNotifications bool = false
149+
param isMailApplicationPermissionGranted bool = false
148150

149151
@description('Enter app configuration name.')
150152
@minLength(1)
@@ -315,6 +317,22 @@ param appConfigurationKeyData array = [
315317
}
316318
description: 'Authentication type for Graph API. Possible values: UserAssignedManagedIdentity, ClientSecret, Certificate'
317319
}
320+
{
321+
key: 'Mail:IsMailApplicationPermissionGranted'
322+
value: isMailApplicationPermissionGranted
323+
contentType: 'bool'
324+
tag: {
325+
tag1: 'Mail'
326+
}
327+
}
328+
{
329+
key: 'Mail:SkipMailNotifications'
330+
value: skipMailNotifications
331+
contentType: 'bool'
332+
tag: {
333+
tag1: 'Mail'
334+
}
335+
}
318336
]
319337

320338
@description('Array of feature flags objects. {id:"value", description:"description", enabled:true }')

0 commit comments

Comments
 (0)