Data Source: oci_core_vcns
This data source provides the list of Vcns in Oracle Cloud Infrastructure Core service.
Lists the virtual cloud networks (VCNs) in the specified compartment.
Supported Aliases
oci_core_virtual_networks
Example Usage
data "oci_core_vcns" "test_vcns" {
#Required
compartment_id = var.compartment_id
#Optional
display_name = var.vcn_display_name
state = var.vcn_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.
Attributes Reference
The following attributes are exported:
virtual_networks
- The list of virtual_networks.
Vcn Reference
The following attributes are exported:
byoipv6cidr_blocks
- The list of BYOIPv6 prefixes required to create a VCN that uses BYOIPv6 ranges.cidr_block
- Deprecated. The first CIDR IP address from cidr_blocks. Example:172.16.0.0/16
cidr_blocks
- The list of IPv4 CIDR blocks the VCN will use.compartment_id
- The OCID of the compartment containing the VCN.default_dhcp_options_id
- The OCID for the VCN’s default set of DHCP options.default_route_table_id
- The OCID for the VCN’s default route table.default_security_list_id
- The OCID for the VCN’s default security list.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.dns_label
- A DNS label for the VCN, used in conjunction with the VNIC’s hostname and subnet’s DNS label to form a fully qualified domain name (FQDN) for each VNIC within this subnet (for example,bminstance1.subnet123.vcn1.oraclevcn.com
). Must be an alphanumeric string that begins with a letter. The value cannot be changed.The absence of this parameter means the Internet and VCN Resolver will not work for this VCN.
For more information, see DNS in Your Virtual Cloud Network.
Example:
vcn1
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 VCN’s Oracle ID (OCID).ipv6cidr_blocks
- For an IPv6-enabled VCN, this is the list of IPv6 prefixes for the VCN’s IP address space. The prefixes are provided by Oracle and the sizes are always /56.ipv6private_cidr_blocks
- For an IPv6-enabled VCN, this is the list of Private IPv6 prefixes for the VCN’s IP address space.security_attributes
- Security Attributes for this resource. This is unique to ZPR, and helps identify which resources are allowed to be accessed by what permission controls. Example:{"Oracle-DataSecurity-ZPR.MaxEgressCount.value": "42", "Oracle-DataSecurity-ZPR.MaxEgressCount.mode": "audit"}
state
- The VCN’s current state.time_created
- The date and time the VCN was created, in the format defined by RFC3339. Example:2016-08-25T21:10:29.600Z
vcn_domain_name
- The VCN’s domain name, which consists of the VCN’s DNS label, and theoraclevcn.com
domain.For more information, see DNS in Your Virtual Cloud Network.
Example:
vcn1.oraclevcn.com