Open JeffGiroux opened 3 years ago
Based on quick search, maybe this code is already implemented. In scanning an ARM template example, I see a couple resource types which match the terraform provider.
https://docs.microsoft.com/en-us/azure/route-server/quickstart-configure-template
"type": "Microsoft.Network/virtualHubs" "type": "Microsoft.Network/virtualHubs/ipConfigurations" "type": "Microsoft.Network/virtualHubs/bgpConnections"
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/virtual_hub https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/virtual_hub_ip https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/virtual_hub_bgp_connection
Is this the right set of resources?
I also noticed that not all fields are exportable. For example, only ID is an attribute in some of the above resources. I'm looking to obtain the ASN and peer IPs of the Azure Route Server similar to how you can run a CLI or powershell command (or view it in Azure portal).
Example powershell Get-AzRouteServer -RouterServerName myRouteServer -ResourceGroupName RouteServerRG
RouteServerAsn : 65515
RouteServerIps : {10.5.10.4, 10.5.10.5}
It does seem that this is the correct set of resources - though it's odd that they still live under Virtual WAN in Azure's REST swagger, so not entirely sure what's up.
I'm fairly certain at this point you can't create a Route Server via REST API alone (we have Virtual Router (which was renamed to Route Server early in preview).
Not sure if all this behavior will change by GA, also - that's the other asterisk, that we're still in preview so things could certainly change.
Almost a year since the original post, Route Server is now GA for some time, where's the resource type in TF?? Im gonna have to call an ARM template from my TF code. Kind of embarassing.
I can't say for sure (haven't tried), but it does appear that people have gotten this working as a Virtual Hub (which is what Route Server is under the hood): https://discuss.hashicorp.com/t/support-of-route-server/22235/3
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/virtual_hub
I can try sometime and report back.
OMG, thats the weirdest thing I've ever seen. It seems to have worked. Thanks for the pointer @SlothCroissant !
Here’s my example I created in the past year. Though I have not updated since Route Server became GA. Worked great.
https://github.com/JeffGiroux/f5_terraform/tree/main/Azure/Route_Server
Community Note
Description
Request support for Azure route server. Reference article below which is recent from March 2021. Says Route Server still in preview. What is usual GA-ready time for terraform provider code once the CSP releases a feature? Does feature need to be in GA before terraform provider code is started? Curious on both and also estimated time frames. Thx
https://docs.microsoft.com/en-us/azure/route-server/overview
New or Affected Resource(s)
Potential Terraform Configuration
References
0000