steampipe plugin install oci

Table: oci_resourcemanager_stack - Query OCI Resource Manager Stacks using SQL

Oracle Cloud Infrastructure (OCI) Resource Manager is a fully managed service that allows you to automate the process of provisioning your Oracle Cloud Infrastructure resources. Using Terraform, Resource Manager helps you install, configure, and manage resources through the "infrastructure-as-code" model. It provides a consistent, reproducible way to create, change, and improve infrastructure.

Table Usage Guide

The oci_resourcemanager_stack table provides insights into the stacks within OCI Resource Manager. As a DevOps engineer, this table allows you to explore stack-specific details, including configurations, terraform versions, and associated metadata. Utilize it to uncover information about stacks, such as their lifecycle state, time created, and the description of the stack.

Examples

Basic info

Explore the status and creation times of your resource manager stacks to understand their lifecycle and manage resources effectively. This can help in assessing the elements within your infrastructure for better planning and resource allocation.

select
id,
display_name,
time_created,
lifecycle_state as state
from
oci_resourcemanager_stack;
select
id,
display_name,
time_created,
lifecycle_state as state
from
oci_resourcemanager_stack;

List resource manager stacks that are not active

Determine the areas in which resource manager stacks are not currently active. This can help in identifying unused resources, potentially optimizing resource usage and reducing costs.

select
id,
display_name,
time_created,
lifecycle_state as state
from
oci_resourcemanager_stack
where
lifecycle_state <> 'ACTIVE';
select
id,
display_name,
time_created,
lifecycle_state as state
from
oci_resourcemanager_stack
where
lifecycle_state <> 'ACTIVE';

List resource manager stacks older than 90 days

Identify instances where resource manager stacks have been in existence for more than 90 days. This can be useful for cleaning up old resources and optimizing resource management.

select
id,
display_name,
time_created,
lifecycle_state as state
from
oci_resourcemanager_stack
where
time_created <= (current_date - interval '90' day)
order by
time_created;
select
id,
display_name,
time_created,
lifecycle_state as state
from
oci_resourcemanager_stack
where
time_created <= date('now', '-90 day')
order by
time_created;

Schema for oci_resourcemanager_stack

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
compartment_idtext=The OCID of the compartment in Tenant in which the resource is located.
config_sourcejsonbThe version of Terraform specified for the stack.
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.
descriptiontextGeneral description of the stack.
display_nametext=Human-readable display name for the stack.
freeform_tagsjsonbFree-form tags for resource. This tags can be applied by any user with permissions on the resource.
idtext=Unique identifier of the specified stack.
lifecycle_statetext=The current lifecycle state of the stack.
regiontextThe OCI region in which the resource is located.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
stack_drift_statustextDrift status of the stack.
tagsjsonbA map of tags for the resource.
tenant_idtext=, !=, ~~, ~~*, !~~, !~~*The OCID of the Tenant in which the resource is located.
tenant_nametextThe name of the Tenant in which the resource is located.
terraform_versiontextThe version of Terraform specified for the stack.
time_createdtimestamp with time zoneThe date and time when the stack was created.
time_drift_last_checkedtimestamp with time zoneThe date and time when the drift detection was last executed.
titletextTitle of the resource.
variablesjsonbTerraform variables associated with this 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_resourcemanager_stack