-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Support azurerm expressroute connection #9849
Comments
Let me clarify. If you need to connect between ExpressRoute Circuit and Virtual Network Gateway for ExpressRoute, you should use azurerm_virtual_network_gateway_connection with express_route_circuit_id argument. The other hands, if you need to connect ExpressRoute Circuit and ExpressRoute Gateway for Virtual WAN, there seems to be no support for creating "expressRouteConnections". Azure REST API Reference: |
I need to connect ExpressRoute Circuit and ExpressRoute Gateway for Virtual WAN so indeed it is lacking support. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
I found workaround. resource "azurerm_resource_group_template_deployment" "example" {
name = "example"
resource_group_name = azurerm_resource_group.example.name
deployment_mode = "Incremental"
parameters_content = jsonencode(
{
"expressRouteCircuitPeeringId" = { value = join("/", [azurerm_express_route_circuit.example.id, "peerings/AzurePrivatePeering"]) },
"authorizationKey" = { value = azurerm_express_route_circuit_authorization.example.authorization_key }
}
)
template_content = <<TEMPLATE
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"expressRouteCircuitPeeringId": {
"type": "string"
},
"authorizationKey": {
"type": "string"
}
},
"resources": [
{
"name": "azure-express-route-gateway/azure-express-route-gateway-connection",
"type": "Microsoft.Network/expressRouteGateways/expressRouteConnections",
"apiVersion": "2020-08-01",
"properties": {
"expressRouteCircuitPeering": {
"id": "[parameters('expressRouteCircuitPeeringId')]"
},
"authorizationKey": "[parameters('authorizationKey')]"
}
}
]
}
TEMPLATE
} |
As a temporary hack, we used null_resource and azure cli to get around this issue. But a hack is always a hack. Hope this will get addressed sometime in the near future. Thank you @ShuheiUda for posting a solution. |
@ShuheiUda can you confirm that it works for you? Error: validating Template Deployment "example" (Resource Group "xxx-RG"): requesting validating: resources.DeploymentsClient#Validate: Failure sending request: StatusCode=400 -- Original Error: Code="InvalidTemplate" Message="Deployment template validation failed: 'The template resource 'XXX-ER_GW-ExRConnection' for type 'Microsoft.Network/expressRouteGateways/expressRouteConnections' at line '1' and column '1130' has incorrect segment lengths. A nested resource type must have identical number of segments as its resource name. A root resource type must have segment length one greater than its resource name. Please see https://aka.ms/arm-template/#resources for usage details.'." AdditionalInfo=[{"info":{"lineNumber":1,"linePosition":1130,"path":"properties.template.resources[0].type"},"type":"TemplateViolation"}] |
This comment has been minimized.
This comment has been minimized.
might be solved by #11320 |
Support azurerm expressroute connection to expressroute gateway
There seems to be no support for creating an actual connection between an ExpressRoute gateway and the ExpressRoute connection.
From the Azure Portal you need to "connect circuit" between the ExpressRoute Gateway and the ExpressRoute connection.
This connection is mandatory for having an actual traffic flow over the ExpressRoute.
A resource like "azurerm_express_route_connection" would fit the functionality.
The Azure resource which needs to be implemented is documented:
https://docs.microsoft.com/en-us/powershell/module/az.network/set-azexpressrouteconnection?view=azps-5.1.0#example-1
datasources:
Please advice.
Raymond
Community Note
Description
New or Affected Resource(s)
Potential Terraform Configuration
References
The text was updated successfully, but these errors were encountered: