Skip to content

Commit a8a8e7d

Browse files
author
Taiseer Joudeh
committed
update params
1 parent 6c70030 commit a8a8e7d

File tree

4 files changed

+11
-29
lines changed

4 files changed

+11
-29
lines changed

bicep/main.bicep

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -66,31 +66,27 @@ param externalTasksQueueName string
6666
@description('The name of the external blob container in Azure Storage.')
6767
param externalTasksContainerBlobName string
6868

69-
@description('The name of the secret containing the External Azure Storage Access key for the Backend Background Processor Service.')
69+
@description('The name of the secret containing the External Azure Storage Access key for the backend processor service.')
7070
param externalStorageKeySecretName string
7171

72-
//Send grid
73-
@description('The name of the secret containing the SendGrid API key value for the Backend Background Processor Service.')
74-
param sendGridKeySecretName string
72+
//SendGrid
73+
@description('The name of the secret containing the SendGrid API key value for the backend processor service.')
74+
param sendGridKeySecretName string = 'sendgrid-api-key'
7575

76-
@description('The name of the Send Grid Email From.')
76+
@description('The name of the SendGrid Email From.')
7777
param sendGridEmailFrom string
7878

79-
@description('The name of the Send Grid Email From Name.')
79+
@description('The name of the SendGrid Email From Name.')
8080
param sendGridEmailFromName string
8181

82-
// When set to 'true', Parameters 'sendGridKeySecretValue' and 'sendGridEmailFrom' should be provided
83-
@description('Set if integration with SendGrid is enabled.')
84-
param sendGridIntegrationEnabled string
82+
@secure()
83+
@description('The SendGrid API key for the backend processor service. If not provided, SendGrid integration will be disabled.')
84+
param sendGridKeySecretValue string
8585

8686
//Cron Shedule Jon
8787
@description('The cron settings for scheduled job.')
8888
param scheduledJobCron string
8989

90-
@secure()
91-
@description('The SendGrid API key for for Backend Background Processor Service.')
92-
param sendGridKeySecretValue string
93-
9490
// Dapr components
9591
@description('The name of Dapr component for the secret store building block.')
9692
// We disable lint of this line as it is not a secret but the name of the Dapr component
@@ -228,7 +224,6 @@ module containerApps 'modules/container-apps.bicep' = {
228224
frontendWebAppServiceImage: frontendWebAppServiceImage
229225
sendGridKeySecretName: sendGridKeySecretName
230226
sendGridKeySecretValue: sendGridKeySecretValue
231-
sendGridIntegrationEnabled: sendGridIntegrationEnabled
232227
applicationInsightsName: containerAppsEnvironment.outputs.applicationInsightsName
233228
externalStorageAccountName: externalStorageAccount.outputs.storageAccountName
234229
externalStorageKeySecretName: externalStorageKeySecretName

bicep/main.parameters.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,15 @@
3232
"cosmosDbCollectionName": {
3333
"value": "taskscollection"
3434
},
35-
"sendGridKeySecretName": {
36-
"value": "sendgrid-api-key"
37-
},
3835
"sendGridKeySecretValue": {
39-
"value": "<SEND_GRID_API_KEY>"
36+
"value": ""
4037
},
4138
"sendGridEmailFrom": {
4239
"value": "<SEND_GRID_FROM_EMAIL>"
4340
},
4441
"sendGridEmailFromName": {
4542
"value": "Tasks Tracker Notification"
4643
},
47-
"sendGridIntegrationEnabled": {
48-
"value": "false"
49-
},
5044
"externalTasksQueueName": {
5145
"value": "external-tasks-queue"
5246
},

bicep/modules/container-apps.bicep

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,6 @@ param sendGridKeySecretName string
5454
@description('The SendGrid API key for for Backend Background Processor Service.')
5555
param sendGridKeySecretValue string
5656

57-
@description('Set if integration with SendGrid is enabled.')
58-
param sendGridIntegrationEnabled string
59-
6057
@description('The name of the secret containing the External Azure Storage Access key for the Backend Background Processor Service.')
6158
param externalStorageKeySecretName string
6259

@@ -180,7 +177,6 @@ module backendProcessorService 'container-apps/processor-backend-service.bicep'
180177
containerRegistryUserAssignedIdentityId: containerRegistryUserAssignedIdentity.id
181178
sendGridKeySecretName: sendGridKeySecretName
182179
sendGridKeySecretValue: sendGridKeySecretValue
183-
sendGridIntegrationEnabled:sendGridIntegrationEnabled
184180
externalStorageAccountName: externalStorageAccountName
185181
externalStorageKeySecretName:externalStorageKeySecretName
186182
backendProcessorServiceImage: backendProcessorServiceImage

bicep/modules/container-apps/processor-backend-service.bicep

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,6 @@ param externalStorageKeySecretName string
3636
@description('The Application Insights Instrumentation.')
3737
param appInsightsInstrumentationKey string
3838

39-
@description('Set if integration with SendGrid is enabled.')
40-
param sendGridIntegrationEnabled string
41-
4239
// Service Bus
4340
@description('The name of the service bus namespace.')
4441
param serviceBusName string
@@ -150,7 +147,7 @@ resource backendProcessorService 'Microsoft.App/containerApps@2022-06-01-preview
150147
env: [
151148
{
152149
name: 'SendGrid__IntegrationEnabled'
153-
value: sendGridIntegrationEnabled
150+
value: empty(sendGridKeySecretValue) ? 'false' : 'true'
154151
}
155152
{
156153
name: 'ApplicationInsights__InstrumentationKey'

0 commit comments

Comments
 (0)