steampipe plugin install oci

Table: oci_core_image_custom - Query OCI Core Custom Images using SQL

Custom Images in OCI Core service are user-created images that are used to launch instances within the Oracle Cloud Infrastructure. They are based on existing boot volumes and can be customized to meet specific requirements. These images are critical for creating multiple instances that are consistently configured.

Table Usage Guide

The oci_core_image_custom table provides insights into custom images within the Oracle Cloud Infrastructure Core service. As a DevOps engineer, you can utilize this table to explore details around these images, including their configuration, associated boot volumes, and launch parameters. This table is particularly useful for managing and auditing the custom images used within your OCI environment.

Examples

Basic info

Explore the basic details of your custom images in Oracle Cloud Infrastructure, such as display name, size, tags, lifecycle state, and operating system. This can help you manage your resources effectively and keep track of your custom images.

select
display_name,
id,
size_in_mbs,
tags,
lifecycle_state,
operating_system
from
oci_core_image_custom;
select
display_name,
id,
size_in_mbs,
tags,
lifecycle_state,
operating_system
from
oci_core_image_custom;

List images with encryption in transit disabled

Explore which custom images have disabled encryption during data transit, to identify potential security risks. This can help in enhancing the data security measures by ensuring encryption is enabled during data transit.

select
display_name,
id,
launch_options ->> 'isPvEncryptionInTransitEnabled' as is_encryption_in_transit_enabled
from
oci_core_image_custom
where
launch_options ->> 'isPvEncryptionInTransitEnabled' = 'false';
select
display_name,
id,
json_extract(
launch_options,
'$.isPvEncryptionInTransitEnabled'
) as is_encryption_in_transit_enabled
from
oci_core_image_custom
where
json_extract(
launch_options,
'$.isPvEncryptionInTransitEnabled'
) = 'false';

Schema for oci_core_image_custom

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
agent_featuresjsonbOracle Cloud Agent features supported on the image.
base_image_idtextThe OCID of the image originally used to launch the instance.
compartment_idtext=The OCID of the compartment in Tenant in which the resource is located.
create_image_allowedbooleanIndicates whether instances launched with this image can be used to create new images.
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 for the image. It does not have to be unique, and it's changeable.
freeform_tagsjsonbFree-form tags for resource. This tags can be applied by any user with permissions on the resource.
idtext=The OCID of the image.
launch_modetextSpecifies the configuration mode for launching virtual machine (VM) instances.
launch_optionsjsonbLaunchOptions Options for tuning the compatibility and performance of VM shapes.
lifecycle_statetext=The image's current state.
operating_systemtext=The image's operating system.
operating_system_versiontext=The image's operating system version.
regiontextThe OCI region in which the resource is located.
size_in_mbsbigintThe boot volume size for an instance launched from this image.
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 image was created.
titletextTitle of the resource.

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_image_custom