Skip to content

Commit d793d57

Browse files
refactor: update customSubDomainName format and adjust publicNetworkAccess logic based on enablePrivateNetworking parameter
1 parent 0d937e8 commit d793d57

File tree

2 files changed

+12
-14
lines changed

2 files changed

+12
-14
lines changed

infra/main.bicep

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -395,15 +395,15 @@ module aiServices 'modules/ai-foundry/aifoundry.bicep' = {
395395
: null
396396
existingFoundryProjectResourceId: azureExistingAIProjectResourceId
397397
disableLocalAuth: true //Should be set to true for WAF aligned configuration
398-
customSubDomainName: 'ais-${solutionSuffix}'
398+
customSubDomainName: 'aif-${solutionSuffix}'
399399
apiProperties: {
400400
//staticsEnabled: false
401401
}
402402
allowProjectManagement: true
403403
managedIdentities: {
404404
systemAssigned: true
405405
}
406-
publicNetworkAccess: 'Disabled'
406+
publicNetworkAccess: enablePrivateNetworking ? 'Disabled' : 'Enabled'
407407
networkAcls: {
408408
bypass: 'AzureServices'
409409
defaultAction: 'Allow'

infra/main.json

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"_generator": {
77
"name": "bicep",
88
"version": "0.37.4.10188",
9-
"templateHash": "17110143098087170499"
9+
"templateHash": "5944351688073580632"
1010
},
1111
"name": "Modernize Your Code Solution Accelerator",
1212
"description": "CSA CTO Gold Standard Solution Accelerator for Modernize Your Code. \r\n"
@@ -20222,7 +20222,7 @@
2022220222
"value": true
2022320223
},
2022420224
"customSubDomainName": {
20225-
"value": "[format('ais-{0}', variables('solutionSuffix'))]"
20225+
"value": "[format('aif-{0}', variables('solutionSuffix'))]"
2022620226
},
2022720227
"apiProperties": {
2022820228
"value": {}
@@ -20235,9 +20235,7 @@
2023520235
"systemAssigned": true
2023620236
}
2023720237
},
20238-
"publicNetworkAccess": {
20239-
"value": "Disabled"
20240-
},
20238+
"publicNetworkAccess": "[if(parameters('enablePrivateNetworking'), createObject('value', 'Disabled'), createObject('value', 'Enabled'))]",
2024120239
"networkAcls": {
2024220240
"value": {
2024320241
"bypass": "AzureServices",
@@ -26005,9 +26003,9 @@
2600526003
},
2600626004
"dependsOn": [
2600726005
"appIdentity",
26008-
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').cognitiveServices)]",
2600926006
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').openAI)]",
2601026007
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').aiServices)]",
26008+
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').cognitiveServices)]",
2601126009
"logAnalyticsWorkspace",
2601226010
"virtualNetwork"
2601326011
]
@@ -26065,7 +26063,7 @@
2606526063
"_generator": {
2606626064
"name": "bicep",
2606726065
"version": "0.37.4.10188",
26068-
"templateHash": "16825226845979775327"
26066+
"templateHash": "13246988107493308882"
2606926067
}
2607026068
},
2607126069
"definitions": {
@@ -26264,7 +26262,7 @@
2626426262
"storageAccount": {
2626526263
"type": "Microsoft.Resources/deployments",
2626626264
"apiVersion": "2022-09-01",
26267-
"name": "[take(format('{0}-sa-deployment', parameters('name')), 64)]",
26265+
"name": "[take(format('avm.res.storage.storage-account.{0}', parameters('name')), 64)]",
2626826266
"properties": {
2626926267
"expressionEvaluationOptions": {
2627026268
"scope": "inner"
@@ -32104,7 +32102,7 @@
3210432102
"_generator": {
3210532103
"name": "bicep",
3210632104
"version": "0.37.4.10188",
32107-
"templateHash": "7990477316673113014"
32105+
"templateHash": "6889583698898903642"
3210832106
}
3210932107
},
3211032108
"definitions": {
@@ -32446,7 +32444,7 @@
3244632444
"keyvault": {
3244732445
"type": "Microsoft.Resources/deployments",
3244832446
"apiVersion": "2022-09-01",
32449-
"name": "[take(format('{0}-kv-deployment', parameters('name')), 64)]",
32447+
"name": "[take(format('avm.res.key-vault.vault.{0}', parameters('name')), 64)]",
3245032448
"properties": {
3245132449
"expressionEvaluationOptions": {
3245232450
"scope": "inner"
@@ -35692,7 +35690,7 @@
3569235690
"_generator": {
3569335691
"name": "bicep",
3569435692
"version": "0.37.4.10188",
35695-
"templateHash": "10457945591968285605"
35693+
"templateHash": "1858982488128583687"
3569635694
}
3569735695
},
3569835696
"definitions": {
@@ -35890,7 +35888,7 @@
3589035888
"cosmosAccount": {
3589135889
"type": "Microsoft.Resources/deployments",
3589235890
"apiVersion": "2022-09-01",
35893-
"name": "[take(format('{0}-account-deployment', parameters('name')), 64)]",
35891+
"name": "[take(format('avm.res.document-db.database-account.{0}', parameters('name')), 64)]",
3589435892
"properties": {
3589535893
"expressionEvaluationOptions": {
3589635894
"scope": "inner"

0 commit comments

Comments
 (0)