Loading...
Loading...
Versions: Terraform v0.13.5 + provider registry.terraform.io/aztfmod/azurecaf v1.1.8 + provider registry.terraform.io/hashicorp/azurerm v2.39.0 Scenario: - 1 VWAN containing 2 HUB's. - 2 ExpressRouters created - 3 Expressroute Gateways created (azurerm_express_route_gateway) when trying to "Circuit connect" using the azurerm_virtual_network_gateway_connection I get the following error: Error: Error Creating/Updating AzureRM Virtual Network Gateway Connection "to_amsterdam" (Resource Group "rg-{}"): network.VirtualNetworkGatewayConnectionsClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="InvalidRequestFormat" Message="Cannot parse the request." Details=[{"code":"InvalidJsonReferenceWrongType","message":"Reference Id /subscriptions/{}/resourceGroups/rg-ing-westeurope/providers/Microsoft.Network/expressRouteGateways/ergw-westeurope-gateway is referencing resource of a wrong type. The Id is expected to reference resources of type virtualNetworkGateways. Path properties.virtualNetworkGateway1."}] ```hcl resource "azurerm_virtual_network_gateway_connection" "to_amsterdam" { name = to_amsterdam" location = azurerm_resource_group.rg_vwan.location resource_group_name = azurerm_resource_group.rg_vwan.name type = "ExpressRoute" virtual_network_gateway_id = azurerm_express_route_gateway.gateway.id express_route_circuit_id = azurerm_express_route_circuit.circuit.id authorization_key = azurerm_express_route_circuit_authorization.circuit_authorization.autjorization_key enable_bgp = false ``` After further investigation there is also the option of using the "azurerm_virtual_network_gateway" resource. this resource supports "type = ExpressRoute". But this resource needs a VNET, subnet and Public IP (ip_configuration block) which should not be needed. When making the "Circuit connection" in the portal this configuration is not needed. Please advice. Ray
Click on a version to see all relevant bugs
Terraform Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.