Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

internet_gateway_route_rules and nat_gateway_route_rules changes are ignored #920

Open
shunsukew opened this issue May 8, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@shunsukew
Copy link

shunsukew commented May 8, 2024

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.

@shunsukew shunsukew added the bug Something isn't working label May 8, 2024
@shunsukew shunsukew changed the title internet_gateway_route_rules and nat_gateway_route_rules are ignored internet_gateway_route_rules and nat_gateway_route_rules changes are ignored May 8, 2024
@shunsukew
Copy link
Author

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.

@hyder
Copy link
Contributor

hyder commented May 8, 2024

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.

@shunsukew
Copy link
Author

shunsukew commented May 8, 2024

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.

@shunsukew
Copy link
Author

shunsukew commented May 10, 2024

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 .

@robo-cap
Copy link
Member

robo-cap commented May 20, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants