Data Source: oci_core_vlans
This data source provides the list of Vlans in Oracle Cloud Infrastructure Core service.
Lists the VLANs in the specified VCN and the specified compartment.
Example Usage
data "oci_core_vlans" "test_vlans" {
#Required
compartment_id = var.compartment_id
#Optional
display_name = var.vlan_display_name
state = var.vlan_state
vcn_id = oci_core_vcn.test_vcn.id
}
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
- (Optional) The OCID of the VCN.
Attributes Reference
The following attributes are exported:
vlans
- The list of vlans.
Vlan Reference
The following attributes are exported:
availability_domain
- The VLAN’s availability domain. This attribute will be null if this is a regional VLAN rather than an AD-specific VLAN. Example:Uocm:PHX-AD-1
cidr_block
- The range of IPv4 addresses that will be used for layer 3 communication with hosts outside the VLAN. Example:192.168.1.0/24
compartment_id
- The OCID of the compartment containing the VLAN.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 VLAN’s Oracle ID (OCID).nsg_ids
- A list of the OCIDs of the network security groups (NSGs) to use with this VLAN. All VNICs in the VLAN belong to these NSGs. For more information about NSGs, see NetworkSecurityGroup.route_table_id
- The OCID of the route table that the VLAN uses.state
- The VLAN’s current state.time_created
- The date and time the VLAN was created, in the format defined by RFC3339. Example:2016-08-25T21:10:29.600Z
vcn_id
- The OCID of the VCN the VLAN is in.vlan_tag
- The IEEE 802.1Q VLAN tag of this VLAN. Example:100