Data Source: oci_core_subnets

This data source provides the list of Subnets in Oracle Cloud Infrastructure Core service.

Lists the subnets in the specified VCN and the specified compartment. If the VCN ID is not provided, then the list includes the subnets from all VCNs in the specified compartment.

Example Usage

data "oci_core_subnets" "test_subnets" {
	#Required
	compartment_id = var.compartment_id

	#Optional
	display_name = var.subnet_display_name
	state = var.subnet_state
	vcn_id = oci_core_vcn.test_vcn.id
}

Argument Reference

The following arguments are supported:

Attributes Reference

The following attributes are exported:

Subnet Reference

The following attributes are exported: