Open olkoko opened 1 week ago
Terraform v1.5.7 on darwin_arm64 + provider registry.terraform.io/oracle/oci v6.18.0
oci_core_vlan oci_core_route_table oci_core_private_ip
resource "oci_core_vcn" "this" { compartment_id = var.network_compartment_id display_name = "test vcn" cidr_blocks = "10.0.0.0/16" } resource "oci_core_vlan" "this" { compartment_id = var.network_compartment_id vcn_id = oci_core_vcn.this.id display_name = "test vlan" cidr_block = "10.0.100.0/24" vlan_tag = "100" route_table_id = oci_core_route_table.this.id } resource "oci_core_route_table" "this" { compartment_id = var.network_compartment_id vcn_id = oci_core_vcn.this.id display_name = "test route table" route_rules { cidr_block = "0.0.0.0/0" network_entity_id = oci_core_vlan.this.id } } resource "oci_core_private_ip" "this" { display_name = "test iprivate ip" ip_address = "10.0.100.5" vlan_id = oci_core_vlan.this.id }
This should create a route table for VLAN with entry referencing Private IP in this VLAN.
Error: Cycle: oci_core_route_table.this, oci_core_vlan.this
See teraform configuration above.
This has been fixed for OCI Subnets back in 2018 by introducing oci_core_route_table_attachment.
oci_core_route_table_attachment
Proposed fix is to enhance oci_core_route_table_attachment to support VLANs.
Community Note
Terraform Version and Provider Version
Affected Resource(s)
Terraform Configuration Files
Debug Output
Expected Behavior
This should create a route table for VLAN with entry referencing Private IP in this VLAN.
Actual Behavior
Steps to Reproduce
See teraform configuration above.
References
This has been fixed for OCI Subnets back in 2018 by introducing
oci_core_route_table_attachment
.Proposed fix is to enhance
oci_core_route_table_attachment
to support VLANs.