Skip to content

Commit 1787c64

Browse files
initial change waf+network
1 parent 4c16efa commit 1787c64

File tree

11 files changed

+550
-920
lines changed

11 files changed

+550
-920
lines changed

infra/main.bicep

Lines changed: 197 additions & 57 deletions
Large diffs are not rendered by default.

infra/modules/ai-foundry/aifoundry.bicep

Lines changed: 3 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -198,48 +198,14 @@ resource cMKUserAssignedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentiti
198198

199199
var useExistingService = !empty(existingFoundryProjectResourceId)
200200

201-
module cognitiveServicesPrivateDnsZone '../privateDnsZone.bicep' = if (!useExistingService && privateNetworking != null && empty(privateNetworking.?cogServicesPrivateDnsZoneResourceId)) {
202-
name: take('${name}-cognitiveservices-pdns-deployment', 64)
203-
params: {
204-
name: 'privatelink.cognitiveservices.${toLower(environment().name) == 'azureusgovernment' ? 'azure.us' : 'azure.com'}'
205-
virtualNetworkResourceId: privateNetworking.?virtualNetworkResourceId ?? ''
206-
tags: tags
207-
}
208-
}
209-
210-
module openAiPrivateDnsZone '../privateDnsZone.bicep' = if (!useExistingService && privateNetworking != null && empty(privateNetworking.?openAIPrivateDnsZoneResourceId)) {
211-
name: take('${name}-openai-pdns-deployment', 64)
212-
params: {
213-
name: 'privatelink.openai.${toLower(environment().name) == 'azureusgovernment' ? 'azure.us' : 'azure.com'}'
214-
virtualNetworkResourceId: privateNetworking.?virtualNetworkResourceId ?? ''
215-
tags: tags
216-
}
217-
}
218-
219-
module aiServicesPrivateDnsZone '../privateDnsZone.bicep' = if (!useExistingService && privateNetworking != null && empty(privateNetworking.?aiServicesPrivateDnsZoneResourceId)) {
220-
name: take('${name}-ai-services-pdns-deployment', 64)
221-
params: {
222-
name: 'privatelink.services.ai.${toLower(environment().name) == 'azureusgovernment' ? 'azure.us' : 'azure.com'}'
223-
virtualNetworkResourceId: privateNetworking.?virtualNetworkResourceId ?? ''
224-
tags: tags
225-
}
226-
}
227-
228201
var cogServicesPrivateDnsZoneResourceId = privateNetworking != null
229-
? (empty(privateNetworking.?cogServicesPrivateDnsZoneResourceId)
230-
? cognitiveServicesPrivateDnsZone.outputs.resourceId ?? ''
231-
: privateNetworking.?cogServicesPrivateDnsZoneResourceId)
202+
? privateNetworking.?cogServicesPrivateDnsZoneResourceId ?? ''
232203
: ''
233204
var openAIPrivateDnsZoneResourceId = privateNetworking != null
234-
? (empty(privateNetworking.?openAIPrivateDnsZoneResourceId)
235-
? openAiPrivateDnsZone.outputs.resourceId ?? ''
236-
: privateNetworking.?openAIPrivateDnsZoneResourceId)
205+
? privateNetworking.?openAIPrivateDnsZoneResourceId ?? ''
237206
: ''
238-
239207
var aiServicesPrivateDnsZoneResourceId = privateNetworking != null
240-
? (empty(privateNetworking.?aiServicesPrivateDnsZoneResourceId)
241-
? aiServicesPrivateDnsZone.outputs.resourceId ?? ''
242-
: privateNetworking.?aiServicesPrivateDnsZoneResourceId)
208+
? privateNetworking.?aiServicesPrivateDnsZoneResourceId ?? ''
243209
: ''
244210

245211
resource cognitiveServiceNew 'Microsoft.CognitiveServices/accounts@2025-04-01-preview' = if(!useExistingService) {

infra/modules/cosmosDb.bicep

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,19 +30,8 @@ param roleAssignments roleAssignmentType[]?
3030
@description('Optional. Enable/Disable usage telemetry for module.')
3131
param enableTelemetry bool = true
3232

33-
module privateDnsZone 'privateDnsZone.bicep' = if (privateNetworking != null && empty(privateNetworking.?privateDnsZoneResourceId)) {
34-
name: take('${name}-documents-pdns-deployment', 64)
35-
params: {
36-
name: 'privatelink.documents.azure.com'
37-
virtualNetworkResourceId: privateNetworking.?virtualNetworkResourceId ?? ''
38-
tags: tags
39-
}
40-
}
41-
4233
var privateDnsZoneResourceId = privateNetworking != null
43-
? (empty(privateNetworking.?privateDnsZoneResourceId)
44-
? privateDnsZone.outputs.resourceId ?? ''
45-
: privateNetworking.?privateDnsZoneResourceId ?? '')
34+
? privateNetworking.?privateDnsZoneResourceId ?? ''
4635
: ''
4736

4837
resource sqlContributorRoleDefinition 'Microsoft.DocumentDB/databaseAccounts/sqlRoleDefinitions@2024-11-15' existing = {
@@ -56,8 +45,6 @@ var logContainerName = 'cmsalog'
5645

5746
module cosmosAccount 'br/public:avm/res/document-db/database-account:0.15.0' = {
5847
name: take('${name}-account-deployment', 64)
59-
#disable-next-line no-unnecessary-dependson
60-
dependsOn: [privateDnsZone] // required due to optional flags that could change dependency
6148
params: {
6249
name: name
6350
enableAnalyticalStorage: true

infra/modules/keyVault.bicep

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,25 +32,12 @@ param secrets secretType[]?
3232
@description('Optional. Enable/Disable usage telemetry for module.')
3333
param enableTelemetry bool = true
3434

35-
module privateDnsZone 'privateDnsZone.bicep' = if (privateNetworking != null && empty(privateNetworking.?privateDnsZoneResourceId)) {
36-
name: take('${name}-kv-pdns-deployment', 64)
37-
params: {
38-
name: 'privatelink.${toLower(environment().name) == 'azureusgovernment' ? 'vaultcore.usgovcloudapi.net' : 'vaultcore.azure.net'}'
39-
virtualNetworkResourceId: privateNetworking.?virtualNetworkResourceId ?? ''
40-
tags: tags
41-
}
42-
}
43-
4435
var privateDnsZoneResourceId = privateNetworking != null
45-
? (empty(privateNetworking.?privateDnsZoneResourceId)
46-
? privateDnsZone.outputs.resourceId ?? ''
47-
: privateNetworking.?privateDnsZoneResourceId ?? '')
36+
? privateNetworking.?privateDnsZoneResourceId ?? ''
4837
: ''
4938

5039
module keyvault 'br/public:avm/res/key-vault/vault:0.12.1' = {
5140
name: take('${name}-kv-deployment', 64)
52-
#disable-next-line no-unnecessary-dependson
53-
dependsOn: [privateDnsZone] // required due to optional flags that could change dependency
5441
params: {
5542
name: name
5643
location: location

infra/modules/network.bicep

Lines changed: 0 additions & 251 deletions
This file was deleted.

0 commit comments

Comments
 (0)