Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fallback vnet for failover dns resolving. #601

Merged
merged 22 commits into from
Sep 4, 2023
Merged
Show file tree
Hide file tree
Changes from 21 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
1585a1f
Update privateDnsZones.bicep
Acenl12 Aug 6, 2023
5658245
Update privateDnsZones.parameters.all.json
Acenl12 Aug 6, 2023
4522975
Merge pull request #1 from Acenl12/Acenl12-patch-1
Acenl12 Aug 6, 2023
99f4a0d
Generate Parameter Markdowns [Acenl12/cc58dddf]
github-actions[bot] Aug 6, 2023
9c5f732
Update infra-as-code/bicep/modules/privateDnsZones/privateDnsZones.bicep
Acenl12 Aug 11, 2023
1d25d3a
Update infra-as-code/bicep/modules/privateDnsZones/parameters/private…
Acenl12 Aug 11, 2023
4e32907
Merge branch 'main' into main
Acenl12 Aug 11, 2023
bb5d2e1
Merge branch 'main' into main
jtracey93 Aug 14, 2023
0fe1077
Merge branch 'main' into main
jtracey93 Aug 24, 2023
3858477
Update infra-as-code/bicep/modules/privateDnsZones/parameters/private…
Acenl12 Aug 24, 2023
3711793
Merge branch 'main' into main
Acenl12 Aug 29, 2023
281d010
Markdown
Aug 29, 2023
7a6a278
Merge branch 'Azure:main' into main
Acenl12 Sep 2, 2023
639e1c6
Updated vwan module with private dns failover network link parameter
Acenl12 Sep 2, 2023
7d16a2f
Merge pull request #2 from Acenl12/Acenl12-patch-1
Acenl12 Sep 2, 2023
63030f2
Update vwanConnectivity.parameters.all.json
Acenl12 Sep 2, 2023
0cd9066
Merge pull request #3 from Acenl12/Acenl12-patch-1
Acenl12 Sep 2, 2023
20aaac8
Fixed some mistakes
Sep 3, 2023
e1bdf06
Markdown
Sep 3, 2023
f8d82b5
Merge pull request #4 from Acenl12/Acenl12-patch-1
Acenl12 Sep 3, 2023
85995f6
Apply suggestions from code review
jtracey93 Sep 4, 2023
6f86e13
Update infra-as-code/bicep/modules/vwanConnectivity/parameters/vwanCo…
jtracey93 Sep 4, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ parPrivateDnsZonesEnabled | No | Switch to enable/disable Private DNS Zone
parPrivateDnsZonesResourceGroup | No | Resource Group Name for Private DNS Zones.
parPrivateDnsZones | No | Array of DNS Zones to provision in Hub Virtual Network. Default: All known Azure Private DNS Zones
parPrivateDnsZoneAutoMergeAzureBackupZone | No | Set Parameter to false to skip the addition of a Private DNS Zone for Azure Backup.
parVirtualNetworkIdToLinkFailover | No | Resource ID of Failover VNet for Private DNS Zone VNet Failover Links
parVpnGatewayConfig | No | Configuration for VPN virtual network gateway to be deployed. If a VPN virtual network gateway is not desired an empty object should be used as the input parameter in the parameter file, i.e. "parVpnGatewayConfig": { "value": {} }
parExpressRouteGatewayConfig | No | Configuration for ExpressRoute virtual network gateway to be deployed. If a ExpressRoute virtual network gateway is not desired an empty object should be used as the input parameter in the parameter file, i.e. "parExpressRouteGatewayConfig": { "value": {} }
parTags | No | Tags you would like to be applied to all resources in this module.
Expand Down Expand Up @@ -284,6 +285,12 @@ Set Parameter to false to skip the addition of a Private DNS Zone for Azure Back

- Default value: `True`

### parVirtualNetworkIdToLinkFailover

![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square)

Resource ID of Failover VNet for Private DNS Zone VNet Failover Links

### parVpnGatewayConfig

![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square)
Expand Down Expand Up @@ -534,6 +541,9 @@ outHubVirtualNetworkId | string |
"parPrivateDnsZoneAutoMergeAzureBackupZone": {
"value": true
},
"parVirtualNetworkIdToLinkFailover": {
"value": ""
},
"parVpnGatewayConfig": {
"value": {
"name": "[format('{0}-Vpn-Gateway', parameters('parCompanyPrefix'))]",
Expand Down
4 changes: 4 additions & 0 deletions infra-as-code/bicep/modules/hubNetworking/hubNetworking.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,9 @@ param parPrivateDnsZones array = [
@sys.description('Set Parameter to false to skip the addition of a Private DNS Zone for Azure Backup.')
param parPrivateDnsZoneAutoMergeAzureBackupZone bool = true

@sys.description('Resource ID of Failover VNet for Private DNS Zone VNet Failover Links')
param parVirtualNetworkIdToLinkFailover string = ''

//ASN must be 65515 if deploying VPN & ER for co-existence to work: https://docs.microsoft.com/en-us/azure/expressroute/expressroute-howto-coexist-resource-manager#limits-and-limitations
@sys.description('''Configuration for VPN virtual network gateway to be deployed. If a VPN virtual network gateway is not desired an empty object should be used as the input parameter in the parameter file, i.e.
"parVpnGatewayConfig": {
Expand Down Expand Up @@ -761,6 +764,7 @@ module modPrivateDnsZones '../privateDnsZones/privateDnsZones.bicep' = if (parPr
parLocation: parLocation
parTags: parTags
parVirtualNetworkIdToLink: resHubVnet.id
parVirtualNetworkIdToLinkFailover: parVirtualNetworkIdToLinkFailover
parPrivateDnsZones: parPrivateDnsZones
parPrivateDnsZoneAutoMergeAzureBackupZone: parPrivateDnsZoneAutoMergeAzureBackupZone
parTelemetryOptOut: parTelemetryOptOut
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ parPrivateDnsZones | No | Array of custom DNS Zones to provision in Hub Vi
parPrivateDnsZoneAutoMergeAzureBackupZone | No | Set Parameter to false to skip the addition of a Private DNS Zone for Azure Backup.
parTags | No | Tags you would like to be applied to all resources in this module.
parVirtualNetworkIdToLink | No | Resource ID of VNet for Private DNS Zone VNet Links.
parVirtualNetworkIdToLinkFailover | No | Resource ID of VNet for Failover Private DNS Zone VNet Links.
parTelemetryOptOut | No | Set Parameter to true to Opt-out of deployment telemetry.

### parLocation
Expand Down Expand Up @@ -49,6 +50,12 @@ Tags you would like to be applied to all resources in this module.

Resource ID of VNet for Private DNS Zone VNet Links.

### parVirtualNetworkIdToLinkFailover

![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square)

Resource ID of VNet for Failover Private DNS Zone VNet Links.

### parTelemetryOptOut

![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square)
Expand Down Expand Up @@ -158,6 +165,9 @@ outPrivateDnsZonesNames | array |
"parVirtualNetworkIdToLink": {
"value": ""
},
"parVirtualNetworkIdToLinkFailover": {
"value": ""
},
"parTelemetryOptOut": {
"value": false
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,9 @@
"parVirtualNetworkIdToLink": {
"value": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/xxxxxxxxxxx/providers/Microsoft.Network/virtualNetworks/xxxxxxxxxxx"
},
"parVirtualNetworkIdToLinkFailover": {
"value": ""
},
"parTelemetryOptOut": {
"value": false
}
Expand Down
16 changes: 16 additions & 0 deletions infra-as-code/bicep/modules/privateDnsZones/privateDnsZones.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ param parTags object = {}
@sys.description('Resource ID of VNet for Private DNS Zone VNet Links.')
param parVirtualNetworkIdToLink string = ''

@sys.description('Resource ID of VNet for Failover Private DNS Zone VNet Links.')
param parVirtualNetworkIdToLinkFailover string = ''
jtracey93 marked this conversation as resolved.
Show resolved Hide resolved


@sys.description('Set Parameter to true to Opt-out of deployment telemetry.')
param parTelemetryOptOut bool = false

Expand Down Expand Up @@ -180,6 +184,18 @@ resource resVirtualNetworkLink 'Microsoft.Network/privateDnsZones/virtualNetwork
dependsOn: resPrivateDnsZones
}]

resource resVirtualNetworkLinkFailover 'Microsoft.Network/privateDnsZones/virtualNetworkLinks@2020-06-01' = [for privateDnsZoneName in varPrivateDnsZonesMerge: if (!empty(parVirtualNetworkIdToLinkFailover)) {
name: '${privateDnsZoneName}/${take('fallbacklink-${uniqueString(parVirtualNetworkIdToLinkFailover)}', 80)}'
location: 'global'
properties: {
registrationEnabled: false
virtualNetwork: {
id: parVirtualNetworkIdToLinkFailover
}
}
dependsOn: resPrivateDnsZones
}]

module modCustomerUsageAttribution '../../CRML/customerUsageAttribution/cuaIdResourceGroup.bicep' = if (!parTelemetryOptOut) {
#disable-next-line no-loc-expr-outside-params
name: 'pid-${varCuaid}-${uniqueString(resourceGroup().location)}'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ parPrivateDnsZonesResourceGroup | No | Resource Group Name for Private DNS
parPrivateDnsZones | No | Array of DNS Zones to provision in Hub Virtual Network.
parPrivateDnsZoneAutoMergeAzureBackupZone | No | Set Parameter to false to skip the addition of a Private DNS Zone for Azure Backup.
parVirtualNetworkIdToLink | No | Resource ID of VNet for Private DNS Zone VNet Links
parVirtualNetworkIdToLinkFailover | No | Resource ID of Failover VNet for Private DNS Zone VNet Failover Links
parTags | No | Tags you would like to be applied to all resources in this module.
parTelemetryOptOut | No | Set Parameter to true to Opt-out of deployment telemetry

Expand Down Expand Up @@ -216,6 +217,12 @@ Set Parameter to false to skip the addition of a Private DNS Zone for Azure Back

Resource ID of VNet for Private DNS Zone VNet Links

### parVirtualNetworkIdToLinkFailover

![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square)

Resource ID of Failover VNet for Private DNS Zone VNet Failover Links

### parTags

![Parameter Setting](https://img.shields.io/badge/parameter-optional-green?style=flat-square)
Expand Down Expand Up @@ -398,6 +405,9 @@ outPrivateDnsZonesNames | array |
"parVirtualNetworkIdToLink": {
"value": ""
},
"parVirtualNetworkIdToLinkFailover": {
"value": ""
},
"parTags": {
"value": {}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,14 @@
"Environment": "Live"
}
},
"parVirtualNetworkIdToLinkFailover": {
"value": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/HUB_Networking_POC/providers/Microsoft.Network/virtualNetworks/alz-hub-eastus-failover"
},
"parTags": {
"value": {
"Environment": "Live"
}
},
jtracey93 marked this conversation as resolved.
Show resolved Hide resolved
"parTelemetryOptOut": {
"value": false
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,9 @@ param parPrivateDnsZoneAutoMergeAzureBackupZone bool = true
@sys.description('Resource ID of VNet for Private DNS Zone VNet Links')
param parVirtualNetworkIdToLink string = ''

@sys.description('Resource ID of Failover VNet for Private DNS Zone VNet Failover Links')
param parVirtualNetworkIdToLinkFailover string = ''

@sys.description('Tags you would like to be applied to all resources in this module.')
param parTags object = {}

Expand Down Expand Up @@ -337,6 +340,7 @@ module modPrivateDnsZones '../privateDnsZones/privateDnsZones.bicep' = if (parPr
parPrivateDnsZones: parPrivateDnsZones
parPrivateDnsZoneAutoMergeAzureBackupZone: parPrivateDnsZoneAutoMergeAzureBackupZone
parVirtualNetworkIdToLink: parVirtualNetworkIdToLink
parVirtualNetworkIdToLinkFailover: parVirtualNetworkIdToLinkFailover
}
}

Expand Down