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 thewhere
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_certificatewhere database_name = 'test';
select *from planetscale_certificatewhere 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
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
branch_name | text | = | Name of the database branch. |
certificate | text | Certificate string. | |
created_at | timestamp with time zone | When the certificate was created. | |
database_name | text | = | Name of the database. |
deleted_at | timestamp with time zone | When the certificate was deleted. | |
id | text | ID of the certificate. | |
name | text | = | Name of the certificate. |
organization_name | text | =, !=, ~~, ~~*, !~~, !~~* | Name of the organization. |
role | text | Role for the certificate. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe 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