@@ -50,7 +50,7 @@ param useLocalBuild string = 'false'
5050// param container_app_parameter container_app_deployment_info_type
5151
5252// =========== Build Parameters ========== //
53- var deployment_param default_deployment_param_type = {
53+ param deployment_param default_deployment_param_type = {
5454 environment_name : environmentName
5555 unique_id : toLower (uniqueString (subscription ().id , environmentName , resourceGroup ().location ))
5656 use_local_build : useLocalBuild == 'true' ? 'localbuild' : 'usecontainer'
@@ -64,18 +64,22 @@ var deployment_param default_deployment_param_type = {
6464 resource_group_location : resourceGroup ().location
6565 resource_name_prefix : {}
6666 resource_name_format_string : '{0}avm-cps'
67- enable_waf : false
67+ enable_waf : true
68+ naming_abbrs : loadJsonContent ('./abbreviations.json' )
6869}
6970
70- var ai_deployment ai_deployment_param_type = {
71+ // ========== Load Abbreviations ========== //
72+ // var abbrs object = loadJsonContent('./abbreviations.json')
73+
74+ param ai_deployment ai_deployment_param_type = {
7175 gpt_deployment_type_name : deploymentType
7276 gpt_model_name : gptModelName
7377 gpt_model_version : gptModelVersion
7478 gpt_deployment_capacity : gptDeploymentCapacity
7579 content_understanding_available_location : contentUnderstandingLocation
7680}
7781
78- var container_app_deployment container_app_deployment_info_type = {
82+ param container_app_deployment container_app_deployment_info_type = {
7983 container_app : {
8084 maxReplicas : 1
8185 minReplicas : 1
@@ -89,14 +93,12 @@ var container_app_deployment container_app_deployment_info_type = {
8993 minReplicas : 1
9094 }
9195}
92- // ========== Load Abbreviations ========== //
93- var abbrs = loadJsonContent ('./abbreviations.json' )
9496
9597// ========== Managed Identity ========== //
9698module avmManagedIdentity './modules/managed-identity.bicep' = {
97- name : format (deployment_param .resource_name_format_string , abbrs .security .managedIdentity )
99+ name : format (deployment_param .resource_name_format_string , deployment_param . naming_abbrs .security .managedIdentity )
98100 params : {
99- name : '${abbrs .security .managedIdentity }${deployment_param .solution_prefix }'
101+ name : '${deployment_param . naming_abbrs .security .managedIdentity }${deployment_param .solution_prefix }'
100102 location : deployment_param .resource_group_location
101103 tags : {
102104 app : deployment_param .solution_prefix
@@ -141,11 +143,11 @@ module avmRoleAssignment 'br/public:avm/ptn/authorization/resource-role-assignme
141143
142144// ========== Key Vault Module ========== //
143145module avmKeyVault './modules/key-vault.bicep' = {
144- name : format (deployment_param .resource_name_format_string , abbrs .security .keyVault )
146+ name : format (deployment_param .resource_name_format_string , deployment_param . naming_abbrs .security .keyVault )
145147 params : {
146148 //name: format(deployment_param.resource_name_format_string, abbrs.security.keyVault)
147149 keyVaultParams : {
148- keyvaultName : '${abbrs .security .keyVault }${deployment_param .solution_prefix }'
150+ keyvaultName : '${deployment_param . naming_abbrs .security .keyVault }${deployment_param .solution_prefix }'
149151 location : deployment_param .resource_group_location
150152 tags : {
151153 app : deployment_param .solution_prefix
@@ -198,9 +200,12 @@ module avmKeyVault_RoleAssignment_appConfig 'br/public:avm/ptn/authorization/res
198200
199201// ========== Application insights ========== //
200202module avmLogAnalyticsWorkspace 'br/public:avm/res/operational-insights/workspace:0.11.2' = {
201- name : format (deployment_param .resource_name_format_string , abbrs .managementGovernance .logAnalyticsWorkspace )
203+ name : format (
204+ deployment_param .resource_name_format_string ,
205+ deployment_param .naming_abbrs .managementGovernance .logAnalyticsWorkspace
206+ )
202207 params : {
203- name : '${abbrs .managementGovernance .logAnalyticsWorkspace }${deployment_param .solution_prefix }'
208+ name : '${deployment_param . naming_abbrs .managementGovernance .logAnalyticsWorkspace }${deployment_param .solution_prefix }'
204209 location : deployment_param .resource_group_location
205210 diagnosticSettings : [{ useThisWorkspace : true }]
206211 skuName : 'PerGB2018'
@@ -209,9 +214,12 @@ module avmLogAnalyticsWorkspace 'br/public:avm/res/operational-insights/workspac
209214}
210215
211216module avmApplicationInsights 'br/public:avm/res/insights/component:0.6.0' = {
212- name : format (deployment_param .resource_name_format_string , abbrs .managementGovernance .applicationInsights )
217+ name : format (
218+ deployment_param .resource_name_format_string ,
219+ deployment_param .naming_abbrs .managementGovernance .applicationInsights
220+ )
213221 params : {
214- name : '${abbrs .managementGovernance .applicationInsights }${deployment_param .solution_prefix }'
222+ name : '${deployment_param . naming_abbrs .managementGovernance .applicationInsights }${deployment_param .solution_prefix }'
215223 location : deployment_param .resource_group_location
216224 workspaceResourceId : avmLogAnalyticsWorkspace .outputs .resourceId
217225 retentionInDays : 30
@@ -235,7 +243,7 @@ module avmContainerRegistry 'modules/container-registry.bicep' = {
235243 //name: format(deployment_param.resource_name_format_string, abbrs.containers.containerRegistry)
236244 params : {
237245 containerRegistryParams : {
238- acrName : '${abbrs .containers .containerRegistry }${replace (deployment_param .solution_prefix , '-' , '' )}'
246+ acrName : '${deployment_param . naming_abbrs .containers .containerRegistry }${replace (deployment_param .solution_prefix , '-' , '' )}'
239247 location : deployment_param .resource_group_location
240248 acrSku : 'Basic'
241249 publicNetworkAccess : 'Enabled'
@@ -254,9 +262,9 @@ module avmContainerRegistry 'modules/container-registry.bicep' = {
254262
255263// // ========== Storage Account ========== //
256264module avmStorageAccount 'br/public:avm/res/storage/storage-account:0.20.0' = {
257- name : format (deployment_param .resource_name_format_string , abbrs .storage .storageAccount )
265+ name : format (deployment_param .resource_name_format_string , deployment_param . naming_abbrs .storage .storageAccount )
258266 params : {
259- name : '${abbrs .storage .storageAccount }${replace (deployment_param .solution_prefix , '-' , '' )}'
267+ name : '${deployment_param . naming_abbrs .storage .storageAccount }${replace (deployment_param .solution_prefix , '-' , '' )}'
260268 location : deployment_param .resource_group_location
261269 skuName : 'Standard_LRS'
262270 kind : 'StorageV2'
@@ -354,10 +362,10 @@ module avmStorageAccount_RoleAssignment_avmContainerApp_API_queue 'br/public:avm
354362// ]
355363
356364module avmAiServices 'br/public:avm/res/cognitive-services/account:0.10.2' = {
357- name : format (deployment_param .resource_name_format_string , abbrs .ai .aiServices )
365+ name : format (deployment_param .resource_name_format_string , deployment_param . naming_abbrs .ai .aiServices )
358366
359367 params : {
360- name : '${abbrs .ai .aiServices }${deployment_param .solution_prefix }'
368+ name : '${deployment_param . naming_abbrs .ai .aiServices }${deployment_param .solution_prefix }'
361369 location : deployment_param .resource_group_location
362370 sku : 'S0'
363371 managedIdentities : { systemAssigned : true }
@@ -366,7 +374,7 @@ module avmAiServices 'br/public:avm/res/cognitive-services/account:0.10.2' = {
366374 app : deployment_param .solution_prefix
367375 location : deployment_param .resource_group_location
368376 }
369- customSubDomainName : '${abbrs .ai .aiServices }${deployment_param .solution_prefix }'
377+ customSubDomainName : '${deployment_param . naming_abbrs .ai .aiServices }${deployment_param .solution_prefix }'
370378 disableLocalAuth : true
371379 publicNetworkAccess : 'Enabled'
372380 // roleAssignments: [
@@ -483,10 +491,10 @@ module avmAiServices_storage_hub 'br/public:avm/res/storage/storage-account:0.20
483491}
484492
485493module avmAiHub 'br/public:avm/res/machine-learning-services/workspace:0.12.1' = {
486- name : format (deployment_param .resource_name_format_string , abbrs .ai .aiHub )
494+ name : format (deployment_param .resource_name_format_string , deployment_param . naming_abbrs .ai .aiHub )
487495 params : {
488- name : '${abbrs .ai .aiHub }${deployment_param .solution_prefix }'
489- friendlyName : '${abbrs .ai .aiHub }${deployment_param .solution_prefix }'
496+ name : '${deployment_param . naming_abbrs .ai .aiHub }${deployment_param .solution_prefix }'
497+ friendlyName : '${deployment_param . naming_abbrs .ai .aiHub }${deployment_param .solution_prefix }'
490498 description : 'AI Hub for CPS template'
491499 location : deployment_param .resource_group_location
492500 sku : 'Basic'
@@ -524,14 +532,14 @@ module avmAiHub 'br/public:avm/res/machine-learning-services/workspace:0.12.1' =
524532}
525533
526534module avmAiProject 'br/public:avm/res/machine-learning-services/workspace:0.12.1' = {
527- name : format (deployment_param .resource_name_format_string , abbrs .ai .aiHubProject )
535+ name : format (deployment_param .resource_name_format_string , deployment_param . naming_abbrs .ai .aiHubProject )
528536 params : {
529- name : '${abbrs .ai .aiHubProject }${deployment_param .solution_prefix }'
537+ name : '${deployment_param . naming_abbrs .ai .aiHubProject }${deployment_param .solution_prefix }'
530538 location : deployment_param .resource_group_location
531539 managedIdentities : { systemAssigned : true }
532540 kind : 'Project'
533541 sku : 'Basic'
534- friendlyName : '${abbrs .ai .aiHubProject }${deployment_param .solution_prefix }'
542+ friendlyName : '${deployment_param . naming_abbrs .ai .aiHubProject }${deployment_param .solution_prefix }'
535543 hubResourceId : avmAiHub .outputs .resourceId
536544 }
537545}
@@ -556,9 +564,12 @@ module avmAiProject 'br/public:avm/res/machine-learning-services/workspace:0.12.
556564
557565// ========== Container App Environment ========== //
558566module avmContainerAppEnv 'br/public:avm/res/app/managed-environment:0.11.1' = {
559- name : format (deployment_param .resource_name_format_string , abbrs .containers .containerAppsEnvironment )
567+ name : format (
568+ deployment_param .resource_name_format_string ,
569+ deployment_param .naming_abbrs .containers .containerAppsEnvironment
570+ )
560571 params : {
561- name : '${abbrs .containers .containerAppsEnvironment }${deployment_param .solution_prefix }'
572+ name : '${deployment_param . naming_abbrs .containers .containerAppsEnvironment }${deployment_param .solution_prefix }'
562573 location : deployment_param .resource_group_location
563574 tags : {
564575 app : deployment_param .solution_prefix
@@ -630,7 +641,7 @@ module bicepAcrPullRoleAssignment 'br/public:avm/ptn/authorization/resource-role
630641module avmContainerApp 'br/public:avm/res/app/container-app:0.16.0' = {
631642 name : format (deployment_param .resource_name_format_string , 'caapp-' )
632643 params : {
633- name : '${abbrs .containers .containerApp }${deployment_param .solution_prefix }-app'
644+ name : '${deployment_param . naming_abbrs .containers .containerApp }${deployment_param .solution_prefix }-app'
634645 location : deployment_param .resource_group_location
635646 environmentResourceId : avmContainerAppEnv .outputs .resourceId
636647 workloadProfileName : 'Consumption'
@@ -652,7 +663,7 @@ module avmContainerApp 'br/public:avm/res/app/container-app:0.16.0' = {
652663
653664 containers : [
654665 {
655- name : '${abbrs .containers .containerApp }${deployment_param .solution_prefix }'
666+ name : '${deployment_param . naming_abbrs .containers .containerApp }${deployment_param .solution_prefix }'
656667 image : '${deployment_param .public_container_image_endpoint }/contentprocessor:latest'
657668
658669 resources : {
@@ -681,7 +692,7 @@ module avmContainerApp 'br/public:avm/res/app/container-app:0.16.0' = {
681692module avmContainerApp_API 'br/public:avm/res/app/container-app:0.16.0' = {
682693 name : format (deployment_param .resource_name_format_string , 'caapi-' )
683694 params : {
684- name : '${abbrs .containers .containerApp }${deployment_param .solution_prefix }-api'
695+ name : '${deployment_param . naming_abbrs .containers .containerApp }${deployment_param .solution_prefix }-api'
685696 location : deployment_param .resource_group_location
686697 environmentResourceId : avmContainerAppEnv .outputs .resourceId
687698 workloadProfileName : 'Consumption'
@@ -704,7 +715,7 @@ module avmContainerApp_API 'br/public:avm/res/app/container-app:0.16.0' = {
704715
705716 containers : [
706717 {
707- name : '${abbrs .containers .containerApp }${deployment_param .solution_prefix }-api'
718+ name : '${deployment_param . naming_abbrs .containers .containerApp }${deployment_param .solution_prefix }-api'
708719 image : '${deployment_param .public_container_image_endpoint }/contentprocessorapi:latest'
709720 resources : {
710721 cpu : '4'
@@ -797,7 +808,7 @@ module avmContainerApp_API 'br/public:avm/res/app/container-app:0.16.0' = {
797808module avmContainerApp_Web 'br/public:avm/res/app/container-app:0.16.0' = {
798809 name : format (deployment_param .resource_name_format_string , 'caweb-' )
799810 params : {
800- name : '${abbrs .containers .containerApp }${deployment_param .solution_prefix }-web'
811+ name : '${deployment_param . naming_abbrs .containers .containerApp }${deployment_param .solution_prefix }-web'
801812 location : deployment_param .resource_group_location
802813 environmentResourceId : avmContainerAppEnv .outputs .resourceId
803814 workloadProfileName : 'Consumption'
@@ -837,7 +848,7 @@ module avmContainerApp_Web 'br/public:avm/res/app/container-app:0.16.0' = {
837848 }
838849 containers : [
839850 {
840- name : '${abbrs .containers .containerApp }${deployment_param .solution_prefix }-web'
851+ name : '${deployment_param . naming_abbrs .containers .containerApp }${deployment_param .solution_prefix }-web'
841852 image : '${deployment_param .public_container_image_endpoint }/contentprocessorweb:latest'
842853 resources : {
843854 cpu : '4'
@@ -897,9 +908,9 @@ module avmContainerApp_Web 'br/public:avm/res/app/container-app:0.16.0' = {
897908
898909// ========== Cosmos Database for Mongo DB ========== //
899910module avmCosmosDB 'br/public:avm/res/document-db/database-account:0.15.0' = {
900- name : format (deployment_param .resource_name_format_string , abbrs .databases .cosmosDBDatabase )
911+ name : format (deployment_param .resource_name_format_string , deployment_param . naming_abbrs .databases .cosmosDBDatabase )
901912 params : {
902- name : '${abbrs .databases .cosmosDBDatabase }${deployment_param .solution_prefix }'
913+ name : '${deployment_param . naming_abbrs .databases .cosmosDBDatabase }${deployment_param .solution_prefix }'
903914 location : deployment_param .resource_group_location
904915 mongodbDatabases : [
905916 {
@@ -941,9 +952,12 @@ module avmCosmosDB 'br/public:avm/res/document-db/database-account:0.15.0' = {
941952
942953// ========== App Configuration ========== //
943954module avmAppConfig 'br/public:avm/res/app-configuration/configuration-store:0.6.3' = {
944- name : format (deployment_param .resource_name_format_string , abbrs .developerTools .appConfigurationStore )
955+ name : format (
956+ deployment_param .resource_name_format_string ,
957+ deployment_param .naming_abbrs .developerTools .appConfigurationStore
958+ )
945959 params : {
946- name : '${abbrs .developerTools .appConfigurationStore }${deployment_param .solution_prefix }'
960+ name : '${deployment_param . naming_abbrs .developerTools .appConfigurationStore }${deployment_param .solution_prefix }'
947961 location : deployment_param .resource_group_location
948962
949963 tags : {
@@ -1147,7 +1161,7 @@ module avmRoleAssignment_container_app_web 'br/public:avm/ptn/authorization/reso
11471161module avmContainerApp_update 'br/public:avm/res/app/container-app:0.16.0' = {
11481162 name : format (deployment_param .resource_name_format_string , 'caapp-update-' )
11491163 params : {
1150- name : '${abbrs .containers .containerApp }${deployment_param .solution_prefix }-app'
1164+ name : '${deployment_param . naming_abbrs .containers .containerApp }${deployment_param .solution_prefix }-app'
11511165 location : deployment_param .resource_group_location
11521166 environmentResourceId : avmContainerAppEnv .outputs .resourceId
11531167 workloadProfileName : 'Consumption'
@@ -1169,7 +1183,7 @@ module avmContainerApp_update 'br/public:avm/res/app/container-app:0.16.0' = {
11691183
11701184 containers : [
11711185 {
1172- name : '${abbrs .containers .containerApp }${deployment_param .solution_prefix }'
1186+ name : '${deployment_param . naming_abbrs .containers .containerApp }${deployment_param .solution_prefix }'
11731187 image : '${deployment_param .public_container_image_endpoint }/contentprocessor:latest'
11741188
11751189 resources : {
@@ -1202,7 +1216,7 @@ module avmContainerApp_update 'br/public:avm/res/app/container-app:0.16.0' = {
12021216module avmContainerApp_API_update 'br/public:avm/res/app/container-app:0.16.0' = {
12031217 name : format (deployment_param .resource_name_format_string , 'caapi-update-' )
12041218 params : {
1205- name : '${abbrs .containers .containerApp }${deployment_param .solution_prefix }-api'
1219+ name : '${deployment_param . naming_abbrs .containers .containerApp }${deployment_param .solution_prefix }-api'
12061220 location : deployment_param .resource_group_location
12071221 environmentResourceId : avmContainerAppEnv .outputs .resourceId
12081222 workloadProfileName : 'Consumption'
@@ -1225,7 +1239,7 @@ module avmContainerApp_API_update 'br/public:avm/res/app/container-app:0.16.0' =
12251239
12261240 containers : [
12271241 {
1228- name : '${abbrs .containers .containerApp }${deployment_param .solution_prefix }-api'
1242+ name : '${deployment_param . naming_abbrs .containers .containerApp }${deployment_param .solution_prefix }-api'
12291243 image : '${deployment_param .public_container_image_endpoint }/contentprocessorapi:latest'
12301244 resources : {
12311245 cpu : '4'
0 commit comments