steampipe plugin install gcp

Table: gcp_logging_bucket - Query Google Cloud Platform Logging Buckets using SQL

A Logging Bucket in Google Cloud Platform is a container for logs. They provide a way to organize and control access to logs. These buckets are used to store logs based on retention and storage policies, ensuring that logs are kept and managed efficiently.

Table Usage Guide

The gcp_logging_bucket table provides insights into Logging Buckets within Google Cloud Platform. As a system administrator, explore bucket-specific details through this table, including location, retention period, and associated metadata. Utilize it to manage and optimize your log data storage, understand your data retention policies, and ensure appropriate access controls are in place.

Examples

Basic info

Explore the lifecycle and retention details of your Google Cloud Platform logging buckets. This can help you understand how long logs are being retained and in what state, assisting in the management and planning of your logging strategy.

select
name,
lifecycle_state,
description,
retention_days
from
gcp_logging_bucket;
select
name,
lifecycle_state,
description,
retention_days
from
gcp_logging_bucket;

List locked buckets

Explore which Google Cloud Platform logging buckets are locked to prevent accidental deletion or alteration of crucial log data. This could be particularly useful for maintaining data security and integrity in your cloud environment.

select
name,
locked
from
gcp_logging_bucket
where
locked;
select
name,
locked
from
gcp_logging_bucket
where
locked = 1;

Schema for gcp_logging_bucket

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
akasjsonbArray of globally unique identifier strings (also known as) for the resource.
create_timetimestamp with time zoneThe creation timestamp of the bucket. This is not set for any of the default buckets.
descriptiontextDescribes this bucket.
lifecycle_statetextThe bucket lifecycle state.
locationtext=The GCP multi-region, region, or zone in which the resource is located.
lockedbooleanSpecifies whether the bucket has been locked, or not. The retention period on a locked bucket may not be changed. Locked buckets may only be deleted if they are empty.
nametext=The resource name of the bucket.
projecttext=, !=, ~~, ~~*, !~~, !~~*The GCP Project in which the resource is located.
retention_daysbigintLogs will be retained by default for this amount of time, after which they will automatically be deleted.
self_linktextThe server-defined URL for the resource.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
titletextTitle of the resource.
update_timetimestamp with time zoneThe last update timestamp of the bucket.

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)" -- gcp

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

steampipe_export_gcp --config '<your_config>' gcp_logging_bucket