Skip to content

Commit 41644a4

Browse files
authored
make pip domain name label unique (#56)
1 parent c10012a commit 41644a4

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

infra-as-code/bicep/jump-box.bicep

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ targetScope = 'resourceGroup'
44
@minLength(1)
55
param location string = resourceGroup().location
66

7+
@description('This is the base name for each Azure resource name (6-8 chars)')
8+
@minLength(6)
9+
@maxLength(8)
10+
param baseName string
11+
712
@description('The name of the virtual network in this resource group.')
813
@minLength(1)
914
param virtualNetworkName string
@@ -70,7 +75,7 @@ resource bastionPublicIp 'Microsoft.Network/publicIPAddresses@2024-05-01' = {
7075
}
7176
deleteOption: 'Delete'
7277
dnsSettings: {
73-
domainNameLabel: bastionHostName
78+
domainNameLabel: '${bastionHostName}-${baseName}'
7479
}
7580
publicIPAddressVersion: 'IPv4'
7681
publicIPAllocationMethod: 'Static'

infra-as-code/bicep/main.bicep

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ module deployJumpBox 'jump-box.bicep' = {
9292
scope: resourceGroup()
9393
params: {
9494
location: location
95+
baseName: baseName
9596
logAnalyticsWorkspaceName: logAnalyticsWorkspace.name
9697
virtualNetworkName: deployVirtualNetwork.outputs.virtualNetworkName
9798
jumpBoxSubnetName: deployVirtualNetwork.outputs.jumpBoxSubnetName

0 commit comments

Comments
 (0)