oracle / terraform-provider-oci

Terraform Oracle Cloud Infrastructure provider
https://www.terraform.io/docs/providers/oci/
Mozilla Public License 2.0
758 stars 681 forks source link

Terraform is recreating all route rules whenever updating the "oci_core_route_table" resources #2195

Open kumar1708 opened 2 months ago

kumar1708 commented 2 months ago

Community Note

Terraform Version and Provider Version

Affected Resource(s)

oci_core_route_table

Terraform Configuration Files

resource "oci_core_route_table" "rt_pvt_sn_vcn_oebs_prod" { compartment_id = var.oebs_prod_compartment_id display_name = "rt-pvt-sn-v-prod" freeform_tags = { } route_rules { description = "Roxxxxxub" destination = "1xxxx" destination_type = "CIDR_BLOCK" network_entity_id = "ocxgdkfqxxxxx" } route_rules { description = "Citrix Ip" destination = "1xxxxxx24" destination_type = "CIDR_BLOCK" network_entity_id = "ocxxxxxxxxxxoccugdkfq" } vcn_id = data.oci_core_vcn.vcn_oebs_prod.vcn_id }

Debug Output

Terraform is recreating all rules whenever adding new rule in route table --->

Panic Output

oci_core_route_table.rt_pvt_sn_vcn_oebs_prod will be updated in-place

~ resource "oci_core_route_table" "rt_pvt_sn_vcn" { id = "ocixxxxxxx6euop7q"

(7 unchanged attributes hidden)

  - route_rules {
      - description       = " Temp Connectivity for RCN/SAPB" -> null
      - destination       = "1xxxxxxx" -> null
      - destination_type  = "CIDR_BLOCK" -> null
      - network_entity_id = "ocxxxxxxfdz7bcdrh6coccugdkfq" -> null
    }
  - route_rules {
      - description       = "05-VDI" -> null
      - destination       = "1xxxxx24" -> null
      - destination_type  = "CIDR_BLOCK" -> null
      - network_entity_id = "xxxxxxxgtwhtzg35fdz7bcdxxxxgdkfq" -> null
    }
  - route_rules {
      - description       = "05-VDI" -> null
      - destination       = "xxxxx4" -> null
      - destination_type  = "CIDR_BLOCK" -> null
      - network_entity_id = "xxxxxxxcugdkfq" -> null
    }

............. And in the same plan all rules are creating again.....

--->

Expected Behavior

Only new rule should have added without affecting the existing route rules

Actual Behavior

All route rules are being recreating

Steps to Reproduce

try to add new route rule in oci_core_route_table

kumar1708 commented 1 month ago

Can someone check this please