steampipe plugin install oci

Table: oci_core_vcn - Query OCI Core Virtual Cloud Networks using SQL

A Virtual Cloud Network (VCN) is a customizable, private network in OCI. It closely resembles a traditional network, with firewall rules and specific types of communication gateways that you can choose to use. A VCN resides in a single OCI region and covers a single, contiguous CIDR block of your choice.

Table Usage Guide

The oci_core_vcn table provides insights into Virtual Cloud Networks within Oracle Cloud Infrastructure (OCI). As a network administrator, you can explore network-specific details through this table, including the state of the VCN, its CIDR block, and associated DNS label. Utilize it to uncover information about your VCNs, such as their default security list, route table, and whether they are using DNS resolution.

Examples

Basic info

Explore which Virtual Cloud Networks (VCNs) are active and the associated metadata for each. This can be useful in gaining insights into your network's configuration and identifying any potential issues or areas for optimization.

select
display_name,
id,
lifecycle_state,
cidr_block,
freeform_tags
from
oci_core_vcn;
select
display_name,
id,
lifecycle_state,
cidr_block,
freeform_tags
from
oci_core_vcn;

List unavailable virtual cloud networks

Explore which virtual cloud networks are currently unavailable. This can be useful in identifying potential issues with network connectivity or resource allocation.

select
display_name,
id,
lifecycle_state
from
oci_core_vcn
where
lifecycle_state <> 'AVAILABLE';
select
display_name,
id,
lifecycle_state
from
oci_core_vcn
where
lifecycle_state <> 'AVAILABLE';

Schema for oci_core_vcn

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
cidr_blockcidrThe first CIDR IP address from cidrBlocks.
cidr_blocksjsonbThe list of IPv4 CIDR blocks the VCN will use.
compartment_idtext=The OCID of the compartment in Tenant in which the resource is located.
default_dhcp_options_idtextThe OCID for the VCN's default set of DHCP options.
default_route_table_idtextThe OCID of the instance.
default_security_list_idtextThe OCID for the VCN's default security list.
defined_tagsjsonbDefined tags for resource. Defined tags are set up in your tenancy by an administrator. Only users granted permission to work with the defined tags can apply them to resources.
display_nametext=A user-friendly name. Does not have to be unique, and it's changeable.
dns_labeltextA 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.
freeform_tagsjsonbFree-form tags for resource. This tags can be applied by any user with permissions on the resource.
idtext=The VCN's Oracle ID (OCID).
ipv6_cidr_blockcidrFor an IPv6-enabled VCN, this is the IPv6 CIDR block for the VCN's private IP address space.
ipv6_cidr_blocksjsonbFor an IPv6-enabled VCN, this is the list of IPv6 CIDR blocks for the VCN's IP address space. The CIDRs are provided by Oracle and the sizes are always /56.
ipv6_public_cidr_blocktextFor an IPv6-enabled VCN, this is the IPv6 CIDR block for the VCN's public IP address space.
lifecycle_statetext=The VCN's current state.
regiontextThe OCI region in which the resource is located.
tagsjsonbA map of tags for the resource.
tenant_idtextThe OCID of the Tenant in which the resource is located.
tenant_nametextThe name of the Tenant in which the resource is located.
time_createdtimestamp with time zoneThe date and time the VCN was created.
titletextTitle of the resource.
vcn_domain_nametextThe VCN's domain name, which consists of the VCN's DNS label, and the oraclevcn.com domain.

Export

This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.

You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh script:

/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- oci

You can pass the configuration to the command with the --config argument:

steampipe_export_oci --config '<your_config>' oci_core_vcn