We currently have Express Route resources in our Azure account that we would like to bring under Terraform management. We have IPv6 configured on our Private Peerings which we are trying to place into Terraform templates. The configuration looks similar to the below:
resource "azurerm_express_route_circuit_peering" "EXAMPLE-PEERING" {
peering_type = "AzurePrivatePeering"
express_route_circuit_name = azurerm_express_route_circuit.EXAMPLE-CKT.name
resource_group_name = azurerm_resource_group.EXAMPLE-RG.name
peer_asn = 64500
primary_peer_address_prefix = "192.168.0.0/30"
secondary_peer_address_prefix = "192.168.0.4/30"
vlan_id = 2000
ipv6 {
primary_peer_address_prefix = "2XXX:fXXX::/126"
secondary_peer_address_prefix = "2XXX:fXXX:1::/126"
microsoft_peering {
}
}
}
I am required to define the “microsoft_peering” block inside an “ipv6” block, however I am not sure why this is required for a Private Peering as none of this is currently configured, hence the empty block.
The major problem is that I am unable to apply this configuration and get the below error:
Error: `ipv6` may only be specified when `peering_type` is set to `MicrosoftPeering`
on 03-peerings.tf line 3, in resource "azurerm_express_route_circuit_peering" "EXAMPLE-PEERING":
3: resource "azurerm_express_route_circuit_peering" "EXAMPLE-PEERING" {
Either am I configuring IPv6 on a Private Peering incorrectly or the Terraform azurerm provider has not been updated to support IPv6 on a Private Peering. Looking at the Terraform code, it looks like the latter could be the case as this checks whether the peering is a Microsoft Peering and throws an error otherwise.