Skip to content

Commit

Permalink
update index reference (Azure#787)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebassem authored Jun 5, 2024
1 parent ce4f9d7 commit 80484be
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,11 @@ var varZtnP1Trigger = (parDdosEnabled && !(contains(map(parVirtualWanHubs, hub =
// Azure Firewalls in Hubs
var varAzureFirewallInHubs = filter(parVirtualWanHubs, hub => hub.parAzFirewallEnabled == true)

var azureFirewallInHubsIndex = [for index in varAzureFirewallInHubs: {
index: indexOf(parVirtualWanHubs, index)
parHubLocation: index.parHubLocation
}]

// Virtual WAN resource
resource resVwan 'Microsoft.Network/virtualWans@2023-04-01' = {
name: parVirtualWanName
Expand Down Expand Up @@ -608,6 +613,6 @@ output outPrivateDnsZones array = (parPrivateDnsZonesEnabled ? modPrivateDnsZone
output outPrivateDnsZonesNames array = (parPrivateDnsZonesEnabled ? modPrivateDnsZones.outputs.outPrivateDnsZonesNames : [])

// Output Azure Firewall Private IP's
output outAzFwPrivateIps array = [for (hub, i) in varAzureFirewallInHubs: {
'${parVirtualWanHubName}-${hub.parHubLocation}': resAzureFirewall[i].properties.hubIPAddresses.privateIPAddress
output outAzFwPrivateIps array = [for (hub, i) in azureFirewallInHubsIndex: {
'${parVirtualWanHubName}-${hub.parHubLocation}': resAzureFirewall[hub.index].properties.hubIPAddresses.privateIPAddress
}]

0 comments on commit 80484be

Please sign in to comment.