turbot/planetscale
steampipe plugin install planetscale

Table: planetscale_deploy_request - Query PlanetScale Deploy Requests using SQL

PlanetScale Deploy Request is a feature within PlanetScale that allows you to manage and monitor the deployment of changes to your databases. It provides a centralized way to track and manage deployment requests for various database resources. PlanetScale Deploy Request helps you stay informed about the status and progress of your deployments and take appropriate actions when predefined conditions are met.

Table Usage Guide

The planetscale_deploy_request table provides insights into deployment requests within PlanetScale. As a DevOps engineer, explore deployment-specific details through this table, including status, progress, and associated metadata. Utilize it to uncover information about deployments, such as those with pending status, the progress of each deployment, and the verification of deployment details.

Examples

List all deploy requests for all databases

Explore which deployment requests have been made for all databases, which can help you keep track of changes and manage resources more effectively.

select
*
from
planetscale_deploy_request;
select
*
from
planetscale_deploy_request;

List deploy requests for a specific database

Discover the segments that have requested deployment for a particular database. This can be useful to track and manage deployment requests, ensuring that they are handled appropriately.

select
*
from
planetscale_deploy_request
where
database_name = 'test';
select
*
from
planetscale_deploy_request
where
database_name = 'test';

List open deploy requests for all databases

Explore which deploy requests are currently open across all databases. This is useful for identifying ongoing deployments and managing resource allocation.

select
*
from
planetscale_deploy_request
where
state = 'open';
select
*
from
planetscale_deploy_request
where
state = 'open';

List deploy requests with no changes

Explore the instances where deployment requests have been made, but no changes were made. This can help in identifying and reducing unnecessary deployment requests, thereby streamlining the deployment process.

select
*
from
planetscale_deploy_request
where
deployment ->> 'state' = 'no_changes';
select
*
from
planetscale_deploy_request
where
json_extract(deployment, '$.state') = 'no_changes';

Schema for planetscale_deploy_request

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form, e.g. connection_name.
approvedbooleanTrue if the deploy request is approved.
branchtextDeploy request branch.
closed_attimestamp with time zoneWhen the deploy request was closed.
created_attimestamp with time zoneWhen the deploy request was created.
database_nametext=Name of the database.
deploymentjsonbDetails of the deployment.
idtextUnique ID for the deplloy request.
into_branchtextDeploy request into branch.
notestextNotes for the deploy request.
numberbigint=Number for this deploy request.
organization_nametextName of the organization.
statetextState of the deploy request.
updated_attimestamp with time zoneWhen the deploy request was updated.

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

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

steampipe_export_planetscale --config '<your_config>' planetscale_deploy_request