-
Notifications
You must be signed in to change notification settings - Fork 680
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
Unable to create route_table with variable number of route_rules #362
Comments
This is a good call out and use case - I agree that there doesn’t appear to be any way to support it based on what we have now. This is a limitation on Terraform’s interpolation syntax, so to support this we would have to provide some other way of specifying route rules. |
This would be possible if route_rules were its own entity instead of part of the routing table itself. Also looking for this functionality as I have configuration for defining variable numbers of ipsec tunnels. |
Seconded adding standalone resource definition for "route rules". |
Really need this myself. I'm trying for each of our customers to pass in a list of networks to a module which could be one or many to route_rules to create one rule per net to route subnet back to customer networks. Can't see a work around at all yet! Anyone have anything promising I can play with to see if we can get a workaround? |
Agreed, managing route rules through Terraform is problematic. In my use case I have a VCN bootstrap module that creates the Route Tables, DRG, IGW, NAT instance, etc. The module will then create Default Route entries per route table plus some routes that point to the DRG. I have a separate module to perform VCN Peering which will create an LPG and add the necessary route table. When this happens the routes created in the VCN Bootstrap module gets removed and replaced with the routes in the VCN Peering module. A separate resource to manage Route Rules would greatly improve this experience. To work around this I've created separate module to manage Route Rules. Unfortunately i have to create the rules using local-exec and CLI commands. The problem with this approach is that the route entries are removed and added when terraform is re run so some caution should be taken in a production environment. Of course all this gets resolved with version 0.12 of Terraform. //route-table module
//TF File
|
Also looking for this, to auto-generate rules for local_peering_gateways. Is there anything planned in the near future? |
The latest versions of oci terraform provider support Terraform v0.12 command. Please let us know if this configuration example could be useful for you to create
Terraform output for the route table resource:
|
the example above allows creating route_table with variable number of route_rules. Please, open a separate request if we still need a separate route_rules resource. thanks! |
How do you add a Service Gateway , nat gateway in the same route table in this example |
Thanks a lot! |
Terraform Version
0.10.8
OCI Provider Version
2.0.4
Description:
There does not appear to be a way to construct a route table with a variable number (count/splat) of route_rules. This makes it impossible to route a variable length list of CIDRs to a DRG or IG.
Support is needed for something like:
The text was updated successfully, but these errors were encountered: