Skip to content

Commit

Permalink
fix: change gatewayType comparisons to lowercase (#659)
Browse files Browse the repository at this point in the history
  • Loading branch information
baartch authored Oct 17, 2023
1 parent 0c59424 commit abcd724
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions infra-as-code/bicep/modules/hubNetworking/hubNetworking.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ module modGatewayPublicIp '../publicIp/publicIp.bicep' = [for (gateway, i) in va
name: 'deploy-Gateway-Public-IP-${i}'
params: {
parLocation: parLocation
parAvailabilityZones: gateway.gatewayType == 'ExpressRoute' ? parAzErGatewayAvailabilityZones : gateway.gatewayType == 'Vpn' ? parAzVpnGatewayAvailabilityZones : []
parAvailabilityZones: toLower(gateway.gatewayType) == 'expressroute' ? parAzErGatewayAvailabilityZones : toLower(gateway.gatewayType) == 'vpn' ? parAzVpnGatewayAvailabilityZones : []
parPublicIpName: '${parPublicIpPrefix}${gateway.name}${parPublicIpSuffix}'
parPublicIpProperties: {
publicIpAddressVersion: 'IPv4'
Expand All @@ -597,13 +597,13 @@ resource resGateway 'Microsoft.Network/virtualNetworkGateways@2023-02-01' = [for
enableDnsForwarding: gateway.enableDnsForwarding
bgpSettings: (gateway.enableBgp) ? gateway.bgpSettings : null
gatewayType: gateway.gatewayType
vpnGatewayGeneration: (gateway.gatewayType == 'VPN') ? gateway.generation : 'None'
vpnGatewayGeneration: (toLower(gateway.gatewayType) == 'vpn') ? gateway.generation : 'None'
vpnType: gateway.vpnType
sku: {
name: gateway.sku
tier: gateway.sku
}
vpnClientConfiguration: (gateway.gatewayType == 'VPN') ? {
vpnClientConfiguration: (toLower(gateway.gatewayType) == 'vpn') ? {
vpnClientAddressPool: contains(gateway.vpnClientConfiguration, 'vpnClientAddressPool') ? gateway.vpnClientConfiguration.vpnClientAddressPool : ''
vpnClientProtocols: contains(gateway.vpnClientConfiguration, 'vpnClientProtocols') ? gateway.vpnClientConfiguration.vpnClientProtocols : ''
vpnAuthenticationTypes: contains(gateway.vpnClientConfiguration, 'vpnAuthenticationTypes') ? gateway.vpnClientConfiguration.vpnAuthenticationTypes : ''
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@
"parVpnGatewayConfig": {
"value": {
"name": "alz-Vpn-Gateway",
"gatewayType": "VPN",
"gatewayType": "Vpn",
"sku": "VpnGw1",
"vpnType": "RouteBased",
"generation": "Generation1",
Expand Down

0 comments on commit abcd724

Please sign in to comment.