Data Source: oci_core_private_ips

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

Lists the PrivateIp objects based on one of these filters:

If you’re listing all the private IPs associated with a given subnet or VNIC, the response includes both primary and secondary private IPs.

If you are an Oracle Cloud VMware Solution customer and have VLANs in your VCN, you can filter the list by VLAN OCID. See Vlan.

Example Usage

# Filter on Subnet OCID
data "oci_core_private_ips" "test_private_ips_by_subnet" {
	#Optional
	subnet_id = var.private_ip_subnet_id
}
# Filter on VNIC OCID
data "oci_core_private_ips" "test_private_ips_by_vnic" {
	#Optional
	vnic_id = oci_core_vnic.test_vnic.id
}
# Filter on private IP address and Subnet OCID
data "oci_core_private_ips" "test_private_ips_by_ip_address" {
	#Optional
	ip_address = var.private_ip_ip_address
	subnet_id = oci_core_subnet.test_subnet.id
	vlan_id = oci_core_vlan.test_vlan.id
	vnic_id = oci_core_vnic_attachment.test_vnic_attachment.id
}

Argument Reference

The following arguments are supported:

Attributes Reference

The following attributes are exported:

PrivateIp Reference

The following attributes are exported: