Skip to content

Commit

Permalink
Resolving issue where private DNS zone VNET link names collide
Browse files Browse the repository at this point in the history
  • Loading branch information
hatboyzero committed Aug 8, 2024
1 parent ee72dd8 commit c3c29d7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion deploy/standard/infra/modules/dns.bicep
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
param key string
param tags object
param vnetId string
param vnetName string
param zone string

output id string = main.id
Expand All @@ -21,7 +22,7 @@ resource main 'Microsoft.Network/privateDnsZones@2018-09-01' existing = {
*/
resource link 'Microsoft.Network/privateDnsZones/virtualNetworkLinks@2018-09-01' = {
parent: main
name: 'foundationallm'
name: vnetName
location: 'global'
tags: tags

Expand Down
1 change: 1 addition & 0 deletions deploy/standard/infra/networking-rg.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -565,6 +565,7 @@ module dns './modules/dns.bicep' = [for zone in items(privateDnsZone): {
params: {
key: zone.key
vnetId: main.id
vnetName: main.name
zone: zone.value

tags: {
Expand Down

0 comments on commit c3c29d7

Please sign in to comment.