steampipe plugin install oci

Table: oci_core_volume_attachment - Query OCI Core Volume Attachments using SQL

A Volume Attachment in Oracle Cloud Infrastructure (OCI) represents the relationship between a volume and an instance. It is a component of OCI Core Services that provides block storage capacity for instances. The volume can be attached in read/write or read-only access mode.

Table Usage Guide

The oci_core_volume_attachment table provides insights into volume attachments within OCI Core Services. As a cloud engineer, you can explore details of volume attachments through this table, including the volume and instance they are attached to, the attachment type, and the state of the attachment. Utilize it to manage and monitor the block storage capacity of your instances, and to ensure optimal configuration and usage of your volumes.

Examples

Basic info

Explore which volume attachments in your Oracle Cloud Infrastructure are active or inactive by checking their lifecycle states and when they were created. This can help you manage your resources more effectively by identifying unused or outdated attachments.

select
id,
display_name,
lifecycle_state,
time_created
from
oci_core_volume_attachment;
select
id,
display_name,
lifecycle_state,
time_created
from
oci_core_volume_attachment;

List idle volume attachments

Determine the areas in which volume attachments are not actively being used. This can help manage resources more effectively by identifying unused elements.

select
id,
display_name,
lifecycle_state,
time_created
from
oci_core_volume_attachment
where
lifecycle_state <> 'ATTACHED';
select
id,
display_name,
lifecycle_state,
time_created
from
oci_core_volume_attachment
where
lifecycle_state <> 'ATTACHED';

List read only volume attachments

Explore which volume attachments are set to read-only status. This can be useful to ensure data integrity by preventing unauthorized modifications.

select
id,
display_name,
lifecycle_state,
time_created
from
oci_core_volume_attachment
where
is_read_only;
select
id,
display_name,
lifecycle_state,
time_created
from
oci_core_volume_attachment
where
is_read_only = 1;

Schema for oci_core_volume_attachment

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
availability_domaintext=The availability domain of an instance.
compartment_idtext=The OCID of the compartment in Tenant in which the resource is located.
devicetextThe device name.
display_nametextA user-friendly name. Does not have to be unique, and it cannot be changed.
idtext=The OCID of the volume attachment.
instance_idtext=The OCID of the instance the volume is attached to.
is_multipathbooleanWhether the attachment is multipath or not.
is_pv_encryption_in_transit_enabledbooleanWhether in-transit encryption for the data volume's paravirtualized attachment is enabled or not.
is_read_onlybooleanWhether the attachment was created in read-only mode.
is_shareablebooleanWhether the attachment should be created in shareable mode.
iscsi_login_statetextThe iscsi login state of the volume attachment.
lifecycle_statetextThe current state of the volume attachment.
regiontextThe OCI region in which the resource is located.
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 volume was created.
titletextTitle of the resource.
volume_idtext=The OCID of the volume.

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_volume_attachment