turbot/planetscale
steampipe plugin install planetscale

Table: planetscale_certificate - Query PlanetScale Certificates using SQL

PlanetScale Certificates are SSL certificates used within the PlanetScale database service for encrypting connections between the client and the server. This ensures the secure transmission of sensitive data over networks. The certificates are automatically managed and renewed by PlanetScale, providing a seamless and secure database experience.

Table Usage Guide

The planetscale_certificate table provides insights into SSL certificates used within the PlanetScale database service. As a Database Administrator, explore certificate-specific details through this table, including certificate state, creation and expiration dates, and associated metadata. Utilize it to uncover information about certificates, such as their current state, the duration of validity, and the verification of expiration dates.

Important Notes

  • You must specify the database_name in the where clause to query this table.

Examples

List all certificates for a database

Explore all certificates related to a particular database to ensure proper security management and compliance. This can be particularly useful in maintaining data integrity and safeguarding sensitive information.

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

List all certificates for all branches

Explore the certificates associated with each branch of your database. This can help in ensuring that all branches are secure and properly certified, aiding in maintaining the overall security posture of your database.

select
c.*
from
planetscale_database as d
join planetscale_certificate as c on d.name = c.database_name;
select
c.*
from
planetscale_database as d
join planetscale_certificate as c on d.name = c.database_name;

Schema for planetscale_certificate

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
branch_nametext=Name of the database branch.
certificatetextCertificate string.
created_attimestamp with time zoneWhen the certificate was created.
database_nametext=Name of the database.
deleted_attimestamp with time zoneWhen the certificate was deleted.
idtextID of the certificate.
nametext=Name of the certificate.
organization_nametext=, !=, ~~, ~~*, !~~, !~~*Name of the organization.
roletextRole for the certificate.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.

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_certificate