oci_core_virtual_circuit

This resource provides the Virtual Circuit resource in Oracle Cloud Infrastructure Core service.

Creates a new virtual circuit to use with Oracle Cloud Infrastructure FastConnect. For more information, see FastConnect Overview.

For the purposes of access control, you must provide the OCID of the compartment where you want the virtual circuit to reside. If you’re not sure which compartment to use, put the virtual circuit in the same compartment with the DRG it’s using. For more information about compartments and access control, see Overview of the IAM Service. For information about OCIDs, see Resource Identifiers.

You may optionally specify a display name for the virtual circuit. It does not have to be unique, and you can change it. Avoid entering confidential information.

Important: When creating a virtual circuit, you specify a DRG for the traffic to flow through. Make sure you attach the DRG to your VCN and confirm the VCN’s routing sends traffic to the DRG. Otherwise traffic will not flow. For more information, see Route Tables.

Example Usage

resource "oci_core_virtual_circuit" "test_virtual_circuit" {
	#Required
	compartment_id = var.compartment_id
	type = var.virtual_circuit_type

	#Optional
	bandwidth_shape_name = var.virtual_circuit_bandwidth_shape_name
	bgp_admin_state = var.virtual_circuit_bgp_admin_state
	cross_connect_mappings {

		#Optional
		bgp_md5auth_key = var.virtual_circuit_cross_connect_mappings_bgp_md5auth_key
		cross_connect_or_cross_connect_group_id = oci_core_cross_connect_or_cross_connect_group.test_cross_connect_or_cross_connect_group.id
		customer_bgp_peering_ip = var.virtual_circuit_cross_connect_mappings_customer_bgp_peering_ip
		customer_bgp_peering_ipv6 = var.virtual_circuit_cross_connect_mappings_customer_bgp_peering_ipv6
		oracle_bgp_peering_ip = var.virtual_circuit_cross_connect_mappings_oracle_bgp_peering_ip
		oracle_bgp_peering_ipv6 = var.virtual_circuit_cross_connect_mappings_oracle_bgp_peering_ipv6
		vlan = var.virtual_circuit_cross_connect_mappings_vlan
	}
	customer_asn = var.virtual_circuit_customer_asn
	customer_bgp_asn = var.virtual_circuit_customer_bgp_asn
	defined_tags = {"Operations.CostCenter"= "42"}
	display_name = var.virtual_circuit_display_name
	freeform_tags = {"Department"= "Finance"}
	ip_mtu = var.virtual_circuit_ip_mtu
	is_bfd_enabled = var.virtual_circuit_is_bfd_enabled
	is_transport_mode = var.virtual_circuit_is_transport_mode
	gateway_id = oci_core_gateway.test_gateway.id
	provider_service_id = data.oci_core_fast_connect_provider_services.test_fast_connect_provider_services.fast_connect_provider_services.0.id
	provider_service_key_name = var.virtual_circuit_provider_service_key_name
	public_prefixes {
		#Required
		cidr_block = var.virtual_circuit_public_prefixes_cidr_block
	}
	region = var.virtual_circuit_region
	routing_policy = var.virtual_circuit_routing_policy
}

Argument Reference

The following arguments are supported:

** IMPORTANT ** Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

Attributes Reference

The following attributes are exported:

Timeouts

The timeouts block allows you to specify timeouts for certain operations: * create - (Defaults to 20 minutes), when creating the Virtual Circuit * update - (Defaults to 20 minutes), when updating the Virtual Circuit * delete - (Defaults to 20 minutes), when destroying the Virtual Circuit

Import

VirtualCircuits can be imported using the id, e.g.

$ terraform import oci_core_virtual_circuit.test_virtual_circuit "id"