-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
ExpressRoute: No support for route filters for Microsoft peering #1083
Comments
Would really love to have this, it is impossible to use proper filtered peering with infrastructure as code without this feature. |
Route filter is needed for a customer project. Any updates? |
Do we have an update of when route filters will be available please? |
Are there any updates for this? This has been open for two years and this is preventing us from configuring our ExpressRoute with MS Peering via Terraform. The only way we are going to be able to get this to work without this is to configure both the ExpressRoute Circuit, Peering, and Route Filter via ARM...as an azurerm_template_deployment. |
An arm template is definitely an option if you need something immediately. I used them a few times in the distant past when azurerm was just getting off the ground. Perhaps we can sketchup what the terraform resources and arguments looks like. |
How does this look? I think for testing adding and creating the route filter and rules should be low impact -- I have to check on the expressroute. I am not sure why this hasn't been addressed. @tombuildsstuff is there a particular challenge you saw? Or is it just the usually time and priority? I would be willing to draft up some initial code if the below looks good. Please advise.
|
Wow, thanks for the quick response @pearcec ! I like what you have so far. Do you think it makes sense to do the route_filter parameter directly in the circuit_peering resource, or would this be a potential use case for a "express_route_peering_route_filter_attachment" sort of resource? (that long name probably isn't ideal either lol) I think one thing to note, and I'm not sure if it has a huge impact on how the provider is written, is that we're wanting to use this in Azure China. The only real difference between China and Global for this service is that it only allows selection of the region communities, and does not allow granular selection of individual service families like in Global Azure. |
I was not 100% sure if we do the peering direct or as an association. I would have to study some other situations to try and be consistent. You can't name the association, so I figured it would make more sense to include it as optional then track state and update the peering. I am hoping someone from the provider team can comment on the proposal. Then I will write some code. I am not sure about the Azure China piece, I don't think we would check the communities for validity. I would let the REST API fail if you passed in garbage. |
@pearcec albeit I’ve not checked that service in a while, but it looks reasonable to me. It may be worth calling it “express route filter” to avoid the duplication in the name, but that’s not a big issue That said, I have a vague recollection that it wasn’t possible to create a Microsoft peering anymore (although I could be thinking of something else) - so I’m wondering how we’d test this if so? For the association resource, I’d suggest we inline that for the moment - we mostly use them to work around API’s which can have circular references - but this seems fine to me without it (at least not having tried it) @mharrison365 in practice Azure Public and China behave similarly enough I think we’d be fine here - likely the only difference is the association values - for which, it appears you can see in the portal, so I think that should be fine |
@tombuildsstuff Thanks, I created Microsoft peering recently. Microsoft deprecated Public Peering for new circuits. They consolidated the it into Microsoft Peering. https://docs.microsoft.com/en-us/azure/expressroute/expressroute-circuit-peerings#peeringcompare They also are not allowing people peer O365 without authorization. See the note in the link below. https://docs.microsoft.com/en-us/office365/enterprise/azure-expressroute I will drop the route_route for route, I was wondering about that as well. We also need to include a data resource. |
I edited my example above. I dropped the express_route from the resources to match the API names. |
As you can see I reference in my commit some early working code. I have the route_filter piece working. I want to find a descent example for the rules. I primarily used route_table for the an example on route_filter. |
@pearcec - the selection process for the rules seems similar to subnet delegation or service endpoints from a UI perspective alone. not sure if that'd be a good starting point? Just wanted to additionally say thanks for your expeditious efforts today in getting this going! I'll keep an eye on it so we can take advantage of it as soon as it's released (assuming all goes well). |
I been using azurerm_route_table routes as an example. I am 99% of the way done with the azurerm_route_filter_rule part. I want to cycle back through and add the option for a rule {} in azurerm_route_filter. It is a bit awkward because I am not creating a data source for the rule. This matches the way route_table and routes are implemented, so it feels like a gap. I felt like doing some code, I miss not be able to do it all the time. I also ran into the same issue you did. I could do everything for expressroute but this. We occasionally add ER ad-hoc and tear them down. |
I need to put a constraint on this. I did notice in the portal it seemed to only support one rule. Need to modify my test to check for the error. I am also need to read up on the Allow vs Deny. There is no provision in the portal for this. Thinking it might be a Deny on one communities enables the rest. Not sure. Need to read.
|
Thinking this through, if there is only one rule allowed there is no point in having a separate resource. I am not sure how to constrain it. It is old how they refer to it a "rules" even though you only get one. I would like to try an confirm it before I toss all the code I worked on for azurerm_route_filter_rule. Let me know if any of you find anything. |
This link seems pretty conclusive. It says you can only have one rule and it must be type Allow. I suppose you could have multiple rules not attached. But they would just be dangling and that seems stupid. I can't see of a reason. I am going to push the code I have into a different branch so we can grab it if something changes. I am going to edit the example above to go with one rule and constrain the access to Allow. |
Other resource types use the singular rule. Update for hashicorp#1083
@mharrison365 It is most of the way there. The only piece is the association. You can build it and test it. Let me know if you find anything. I am working on the last piece now. I will submit a pull request then. I hope you are using azurerm 2.0 💃 |
Last update for hashicorp#1083. The tests are all set to lowercase. Assuming it is an expense issue. The test was run successfully for TestAccAzureRMExpressRouteCircuitPeering_microsoftPeeringWithRouteFilter. === RUN TestAccAzureRMExpressRouteCircuitPeering_microsoftPeeringWithRouteFilter --- PASS: TestAccAzureRMExpressRouteCircuitPeering_microsoftPeeringWithRouteFilter (372.94s) PASS ok github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/network/tests 375.315
I submitted a pull request. @mharrison365 I am done if you want to test it. |
Adding @tombuildsstuff - I finished the code. Have a look. |
Build is failing some lint checks, I am fixing them up now. |
@pearcec Awesome!! Thanks for the update! I am using AzureRM2.0 :) I'll see what I can do to test it out |
@tombuildsstuff - do you see any issues with adding this to the 2.5 milestone/release? |
@mharrison365 did you test it 😃 |
Other resource types use the singular rule. Update for hashicorp#1083
Last update for hashicorp#1083. The tests are all set to lowercase. Assuming it is an expense issue. The test was run successfully for TestAccAzureRMExpressRouteCircuitPeering_microsoftPeeringWithRouteFilter. === RUN TestAccAzureRMExpressRouteCircuitPeering_microsoftPeeringWithRouteFilter --- PASS: TestAccAzureRMExpressRouteCircuitPeering_microsoftPeeringWithRouteFilter (372.94s) PASS ok github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/network/tests 375.315
…te_filter) (#6341) * Add azurerm_route_filter for #1083 * Updated azurerm_route_filter to include rules * Changed rules -> rule for consistency * Adding route_filter_id for azurerm_express_route_circuit_peering The test was run successfully for TestAccAzureRMExpressRouteCircuitPeering_microsoftPeeringWithRouteFilter. === RUN TestAccAzureRMExpressRouteCircuitPeering_microsoftPeeringWithRouteFilter --- PASS: TestAccAzureRMExpressRouteCircuitPeering_microsoftPeeringWithRouteFilter (372.94s) PASS ok github.com/terraform-providers/terraform-provider-azurerm/azurerm/internal/services/network/tests 375.315 Co-authored-by: Christian Pearce <[email protected]> Co-authored-by: Tom Bamford <[email protected]>
This has been released in version 2.19.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example: provider "azurerm" {
version = "~> 2.19.0"
}
# ... other configuration ... |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 [email protected]. Thanks! |
Community Note
Description
Terraform Version
0.11.6
Affected Resource(s)
express_route_circuit_peering (peering type MicrosoftPeering)
Terraform Configuration Files
N/A
Debug Output
N/A
Panic Output
N/A
Expected Behavior
Support for route filters for Microsoft peering; see link below
https://docs.microsoft.com/en-us/azure/expressroute/how-to-routefilter-powershell
Actual Behavior
No support for route filters for Microsoft peering as stated in the Microsoft article below.
https://docs.microsoft.com/en-us/azure/expressroute/how-to-routefilter-powershell
Steps to Reproduce
N/A
Important Factoids
N/A
References
https://docs.microsoft.com/en-us/azure/expressroute/how-to-routefilter-powershell
Important
Microsoft peering of ExpressRoute circuits that were configured prior to August 1, 2017 will have all service prefixes advertised through the Microsoft peering, even if route filters are not defined. Microsoft peering of ExpressRoute circuits that are configured on or after August 1, 2017 will not have any prefixes advertised until a route filter is attached to the circuit. For more information, see Configure a route filter for Microsoft peering.
https://docs.microsoft.com/en-us/azure/expressroute/expressroute-howto-routing-portal-resource-manager
The text was updated successfully, but these errors were encountered: