Skip to content

Commit

Permalink
Merge pull request #1306 from solliancenet/mg-hub-dns-update
Browse files Browse the repository at this point in the history
Updating Standard Hub deployment to create regional AKS and ACR private DNS zones
  • Loading branch information
ciprianjichici authored Jul 31, 2024
2 parents 2b1a5b8 + a4ce2c5 commit ea2c8a1
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 4 deletions.
1 change: 1 addition & 0 deletions deploy/standard-hub/config/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
vpn
36 changes: 32 additions & 4 deletions deploy/standard-hub/infra/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,42 @@ param timestamp string = utcNow()
var abbrs = loadJsonContent('./abbreviations.json')
var resourceGroup = namer(abbrs.resourcesResourceGroups, environmentName, location, 'net', project)

var privateDnsZones = {
param privateDnsLocations array = [
'australiaeast'
'canadaeast'
'eastus'
'eastus2'
'francecentral'
'japaneast'
'northcentralus'
'norwayeast'
'southcentralus'
'swedencentral'
'switzerlandnorth'
'southindia'
'uksouth'
'westeurope'
'westus'
'westus3'
]

var regionalZones = [for zoneLocation in privateDnsLocations: {
'aks_${zoneLocation}': 'privatelink.${zoneLocation}.azmk8s.io'
'cr_${zoneLocation}': '${zoneLocation}.privatelink.azurecr.io'
}
]

var regionalPrivateDnsZones = reduce(regionalZones,
{},
(curr, acc) => union(curr, acc)
)

var privateDnsZones = union({
agentsvc: 'privatelink.agentsvc.azure-automation.net'
aks: 'privatelink.${location}.azmk8s.io'
blob: 'privatelink.blob.${environment().suffixes.storage}'
cognitiveservices: 'privatelink.cognitiveservices.azure.com'
configuration_stores: 'privatelink.azconfig.io'
cosmosdb: 'privatelink.documents.azure.com'
cr_region: '${location}.privatelink.azurecr.io'
cr: 'privatelink.azurecr.io'
dfs: 'privatelink.dfs.${environment().suffixes.storage}'
eventgrid: 'privatelink.eventgrid.azure.net'
Expand All @@ -33,7 +61,7 @@ var privateDnsZones = {
sql_server: 'privatelink${environment().suffixes.sqlServerHostname}'
table: 'privatelink.table.${environment().suffixes.storage}'
vault: 'privatelink.vaultcore.azure.net'
}
}, regionalPrivateDnsZones)

var tags = {
'azd-env-name': environmentName
Expand Down

0 comments on commit ea2c8a1

Please sign in to comment.