» Data Source: oci_core_route_tables
This data source provides the list of Route Tables in Oracle Cloud Infrastructure Core service.
Lists the route tables in the specified VCN and specified compartment. The response includes the default route table that automatically comes with each VCN, plus any route tables you've created.
» Example Usage
data "oci_core_route_tables" "test_route_tables" {
#Required
compartment_id = "${var.compartment_id}"
vcn_id = "${oci_core_vcn.test_vcn.id}"
#Optional
display_name = "${var.route_table_display_name}"
state = "${var.route_table_state}"
}
» Argument Reference
The following arguments are supported:
-
compartment_id
- (Required) The OCID of the compartment. -
display_name
- (Optional) A filter to return only resources that match the given display name exactly. -
state
- (Optional) A filter to only return resources that match the given lifecycle state. The state value is case-insensitive. -
vcn_id
- (Required) The OCID of the VCN.
» Attributes Reference
The following attributes are exported:
-
route_tables
- The list of route_tables.
» RouteTable Reference
The following attributes are exported:
-
compartment_id
- The OCID of the compartment containing the route table. -
defined_tags
- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:{"Operations.CostCenter": "42"}
-
display_name
- A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information. -
freeform_tags
- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:{"Department": "Finance"}
-
id
- The route table's Oracle ID (OCID). -
route_rules
- The collection of rules for routing destination IPs to network devices.-
cidr_block
- Deprecated. Instead usedestination
anddestinationType
. Requests that include bothcidrBlock
anddestination
will be rejected.A destination IP address range in CIDR notation. Matching packets will be routed to the indicated network entity (the target).
Example:
0.0.0.0/0
-
destination
- Conceptually, this is the range of IP addresses used for matching when routing traffic. Required if you provide adestinationType
.Allowed values:
- IP address range in CIDR notation. For example:
192.168.1.0/24
- The
cidrBlock
value for a Service, if you're setting up a route rule for traffic destined for a particular service through a service gateway. For example:oci-phx-objectstorage
- IP address range in CIDR notation. For example:
-
destination_type
- Type of destination for the rule. Required if you provide adestination
.-
CIDR_BLOCK
: If the rule'sdestination
is an IP address range in CIDR notation. -
SERVICE_CIDR_BLOCK
: If the rule'sdestination
is thecidrBlock
value for a Service (the rule is for traffic destined for a particular service through a service gateway).
-
-
network_entity_id
- The OCID for the route rule's target. For information about the type of targets you can specify, see Route Tables.
-
-
state
- The route table's current state. -
time_created
- The date and time the route table was created, in the format defined by RFC3339. Example:2016-08-25T21:10:29.600Z
-
vcn_id
- The OCID of the VCN the route table list belongs to.