terraform-oci-oke
terraform-oci-oke copied to clipboard
`internet_gateway_route_rules` and `nat_gateway_route_rules` changes are ignored
Community Note
- Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Terraform Version and Provider Version
Terraform v1.6.6
on darwin_arm64
+ provider registry.terraform.io/hashicorp/cloudinit v2.3.3
+ provider registry.terraform.io/hashicorp/helm v2.12.1
+ provider registry.terraform.io/hashicorp/http v3.4.2
+ provider registry.terraform.io/hashicorp/null v3.2.2
+ provider registry.terraform.io/hashicorp/oci v5.33.0
+ provider registry.terraform.io/hashicorp/random v3.6.0
+ provider registry.terraform.io/hashicorp/time v0.10.0
+ provider registry.terraform.io/oracle/oci v5.30.0
Your version of Terraform is out of date! The latest version
is 1.8.2. You can update by downloading from https://www.terraform.io/downloads.html
Affected Resource(s)
module.{module_name}.module.internet_gateway_route_rules
and
module.{module_name}.module.nat_gateway_route_rules
Terraform Configuration Files
This is just an example. Added rules in internet_gateway_route_rules section.
{
destination = "192.168.0.0/16" # Route Rule Destination CIDR
destination_type = "CIDR_BLOCK" # only CIDR_BLOCK is supported at the moment
network_entity_id = "drg" # for internet_gateway_route_rules input variable, you can use special strings "drg", "internet_gateway" or pass a valid OCID using string or any Named Values
description = "Terraformed - User added Routing Rule: To drg provided to this module. drg_id, if available, is automatically retrieved with keyword drg"
},
{
destination = "10.0.0.0/16" # Route Rule Destination CIDR
destination_type = "CIDR_BLOCK" # only CIDR_BLOCK is supported at the moment
network_entity_id = "drg"
description = ""
}
Expected Behavior
Chages are detected when terraform plan or apply. internet_gateway_route_rules are updated by execution.
Docs says it is upgradable. https://registry.terraform.io/modules/oracle-terraform-modules/oke/oci/latest?tab=inputs
Actual Behavior
No changes are detected.
No changes. Your infrastructure matches the configuration.
Terraform has compared your real infrastructure against your configuration and found no differences, so no changes are needed.
Steps to Reproduce
Add rules to internet_gateway_route_rules or nat_gateway_route_rules. And terraform plan or apply.
At this moment, null is set to ig_route_table_id and nat_route_table_id, trying to update rules for route tables created by default.
Hi,
You would only set the ig_route_table and nat_route_table ids if you are using an existing vcn with existing route tables.
Further, the route rules only apply if the route tables are being created by the terraform OKE module. If you created them separately, you need to add those rules separately too.
Thank you for the response.
You would only set the ig_route_table and nat_route_table ids if you are using an existing vcn with existing route tables.
My comment here was just for information sharing. We set null and don't want to use existing vcn and route tables. So, we can keep those as they're null.
Further, the route rules only apply if the route tables are being created by the terraform OKE module. If you created them separately, you need to add those rules separately too.
Yes, route tables ware created by OKE module, and expecting changes to be detected. But they aren't detected as I shared above.
I added drg_id referencing a drg created outside of this module. Then, rules defined in internet_gateway_route_rules with network_entity_id = "drg" started to be reflected as expected.
However, when no drg are set, still having the same issue.
So at least, the problem I was facing was gone after setting drg_id .
This module calls the VCN terraform module for the networking resources. You can see how routing rules are populated here.
Please confirm if you still face issues, or if this can be closed.