terraform-azurerm-caf
terraform-azurerm-caf copied to clipboard
Fix VPN Gateway Connection Routing
1926
PR Checklist
- [x] I have added example(s) inside the [./examples/] folder
- [x] I have added the example(s) to the integration test list for normal (~30 minutes) or long runner >30 minutes
- [x] I have checked the coding conventions as per the wiki
- [x] I have checked to ensure there aren't other open Pull Requests for the same update/change?
Description
Current routing
block has the following error:
-
associated_route_table
can be set to any custom table, but based on documentation and error, it can only be set to Default Route Table -
propagated_route_table
block is not working and errors out -
labels
block is not working and errors out
Fix:
-
associated_route_table
now defaults to Default Route Table when not set (I kept the existing code that allows setting custom route tables, in case it works in old versions of provider or may be supported in the future -
propagated_route_table
now wraps route tables intoroute_tables
-
labels
is now insideroute_tables
to associate labels for each routing table
Does this introduce a breaking change
- [x] YES
- [ ] NO
Current code is broken and results into errors described in 1926
If you currently have propagated_route_table
in your code, add route_tables
. If you have associated_route_table
set to anything other than Default Route Table, it doesn't seem to be supported, so now it will be added by default if associated_route_table
is not in the code. Please refer to changes in example examples/networking/virtual_wan/109-vwan-vpn-gateway-connection/virtual_wan.tfvars
Testing
Run example examples/networking/virtual_wan/109-vwan-vpn-gateway-connection/virtual_wan.tfvars
I was able to successfully run it in my testing.
Apply complete! Resources: 17 added, 0 changed, 0 destroyed.