Viewing docs for planetscale 1.0.0
published on Monday, Mar 2, 2026 by planetscale
published on Monday, Mar 2, 2026 by planetscale
Viewing docs for planetscale 1.0.0
published on Monday, Mar 2, 2026 by planetscale
published on Monday, Mar 2, 2026 by planetscale
Databases DataSource
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as planetscale from "@pulumi/planetscale";
const myDatabases = planetscale.getDatabases({
organization: "...my_organization...",
q: "...my_q...",
});
import pulumi
import pulumi_planetscale as planetscale
my_databases = planetscale.get_databases(organization="...my_organization...",
q="...my_q...")
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/planetscale/planetscale"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := planetscale.GetDatabases(ctx, &planetscale.GetDatabasesArgs{
Organization: "...my_organization...",
Q: pulumi.StringRef("...my_q..."),
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Planetscale = Pulumi.Planetscale;
return await Deployment.RunAsync(() =>
{
var myDatabases = Planetscale.GetDatabases.Invoke(new()
{
Organization = "...my_organization...",
Q = "...my_q...",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.planetscale.PlanetscaleFunctions;
import com.pulumi.planetscale.inputs.GetDatabasesArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
public static void main(String[] args) {
Pulumi.run(App::stack);
}
public static void stack(Context ctx) {
final var myDatabases = PlanetscaleFunctions.getDatabases(GetDatabasesArgs.builder()
.organization("...my_organization...")
.q("...my_q...")
.build());
}
}
variables:
myDatabases:
fn::invoke:
function: planetscale:getDatabases
arguments:
organization: '...my_organization...'
q: '...my_q...'
Using getDatabases
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getDatabases(args: GetDatabasesArgs, opts?: InvokeOptions): Promise<GetDatabasesResult>
function getDatabasesOutput(args: GetDatabasesOutputArgs, opts?: InvokeOptions): Output<GetDatabasesResult>def get_databases(organization: Optional[str] = None,
q: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetDatabasesResult
def get_databases_output(organization: Optional[pulumi.Input[str]] = None,
q: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetDatabasesResult]func GetDatabases(ctx *Context, args *GetDatabasesArgs, opts ...InvokeOption) (*GetDatabasesResult, error)
func GetDatabasesOutput(ctx *Context, args *GetDatabasesOutputArgs, opts ...InvokeOption) GetDatabasesResultOutput> Note: This function is named GetDatabases in the Go SDK.
public static class GetDatabases
{
public static Task<GetDatabasesResult> InvokeAsync(GetDatabasesArgs args, InvokeOptions? opts = null)
public static Output<GetDatabasesResult> Invoke(GetDatabasesInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetDatabasesResult> getDatabases(GetDatabasesArgs args, InvokeOptions options)
public static Output<GetDatabasesResult> getDatabases(GetDatabasesArgs args, InvokeOptions options)
fn::invoke:
function: planetscale:index/getDatabases:getDatabases
arguments:
# arguments dictionaryThe following arguments are supported:
- Organization string
- Organization name slug from
list_organizations. Example:acme. - Q string
- Search term to filter databases by name
- Organization string
- Organization name slug from
list_organizations. Example:acme. - Q string
- Search term to filter databases by name
- organization String
- Organization name slug from
list_organizations. Example:acme. - q String
- Search term to filter databases by name
- organization string
- Organization name slug from
list_organizations. Example:acme. - q string
- Search term to filter databases by name
- organization str
- Organization name slug from
list_organizations. Example:acme. - q str
- Search term to filter databases by name
- organization String
- Organization name slug from
list_organizations. Example:acme. - q String
- Search term to filter databases by name
getDatabases Result
The following output properties are available:
- Datas
List<Get
Databases Data> - Id string
- The provider-assigned unique ID for this managed resource.
- Organization string
- Organization name slug from
list_organizations. Example:acme. - Q string
- Search term to filter databases by name
- Datas
[]Get
Databases Data - Id string
- The provider-assigned unique ID for this managed resource.
- Organization string
- Organization name slug from
list_organizations. Example:acme. - Q string
- Search term to filter databases by name
- datas
List<Get
Databases Data> - id String
- The provider-assigned unique ID for this managed resource.
- organization String
- Organization name slug from
list_organizations. Example:acme. - q String
- Search term to filter databases by name
- datas
Get
Databases Data[] - id string
- The provider-assigned unique ID for this managed resource.
- organization string
- Organization name slug from
list_organizations. Example:acme. - q string
- Search term to filter databases by name
- datas
Sequence[Get
Databases Data] - id str
- The provider-assigned unique ID for this managed resource.
- organization str
- Organization name slug from
list_organizations. Example:acme. - q str
- Search term to filter databases by name
- datas List<Property Map>
- id String
- The provider-assigned unique ID for this managed resource.
- organization String
- Organization name slug from
list_organizations. Example:acme. - q String
- Search term to filter databases by name
Supporting Types
GetDatabasesData
- Allow
Data boolBranching - Whether seeding branches with data is enabled for all branches
- At
Backup boolRestore Branches Limit - If the database has reached its backup restored branch limit
- At
Development boolBranch Usage Limit - If the database has reached its development branch limit
- Automatic
Migrations bool - Whether to automatically manage Rails migrations during deploy requests
- Branches
Count double - The total number of database branches
- Branches
Url string - The URL to retrieve this database's branches via the API
- Created
At string - When the database was created
- Data
Import GetDatabases Data Data Import - Default
Branch string - The default branch for the database
- Default
Branch doubleRead Only Regions Count - Number of read only regions in the default branch
- Default
Branch doubleShard Count - Number of shards in the default branch
- Default
Branch doubleTable Count - Number of tables in the default branch schema
- Development
Branches doubleCount - The total number of database development branches
- Foreign
Keys boolEnabled - Whether foreign key constraints are enabled
- Html
Url string - The URL to see this database's branches in the web UI
- Id string
- The ID of the database
- Insights
Enabled bool - True if query insights is enabled for the database
- Insights
Raw boolQueries - Whether raw SQL queries are collected
- Issues
Count double - The total number of ongoing issues within a database
- Kind string
- The kind of database
- Migration
Framework string - Framework used for applying migrations
- Migration
Table stringName - Table name to use for copying schema migration data
- Multiple
Admins boolRequired For Deletion - If the database requires multiple admins for deletion
- Name string
- Name of the database
- Open
Schema doubleRecommendations Count - The total number of schema recommendations
- Plan string
- The database plan
- Production
Branch boolWeb Console - Whether web console is enabled for production branches
- Production
Branches doubleCount - The total number of database production branches
- Ready bool
- If the database is ready to be used
- Region
Get
Databases Data Region - Require
Approval boolFor Deploy - Whether an approval is required to deploy schema changes to this database
- Resize
Queued bool - True if a branch has a queued resize request
- Resizing bool
- True if a branch is currently resizing
- Restrict
Branch boolRegion - Whether to restrict branch creation to one region
- Schema
Last stringUpdated At - When the default branch schema was last changed.
- bool
- If the database is sharded
- State string
- State of the database
- Updated
At string - When the database was last updated
- Url string
- The URL to the database API endpoint
- Allow
Data boolBranching - Whether seeding branches with data is enabled for all branches
- At
Backup boolRestore Branches Limit - If the database has reached its backup restored branch limit
- At
Development boolBranch Usage Limit - If the database has reached its development branch limit
- Automatic
Migrations bool - Whether to automatically manage Rails migrations during deploy requests
- Branches
Count float64 - The total number of database branches
- Branches
Url string - The URL to retrieve this database's branches via the API
- Created
At string - When the database was created
- Data
Import GetDatabases Data Data Import - Default
Branch string - The default branch for the database
- Default
Branch float64Read Only Regions Count - Number of read only regions in the default branch
- Default
Branch float64Shard Count - Number of shards in the default branch
- Default
Branch float64Table Count - Number of tables in the default branch schema
- Development
Branches float64Count - The total number of database development branches
- Foreign
Keys boolEnabled - Whether foreign key constraints are enabled
- Html
Url string - The URL to see this database's branches in the web UI
- Id string
- The ID of the database
- Insights
Enabled bool - True if query insights is enabled for the database
- Insights
Raw boolQueries - Whether raw SQL queries are collected
- Issues
Count float64 - The total number of ongoing issues within a database
- Kind string
- The kind of database
- Migration
Framework string - Framework used for applying migrations
- Migration
Table stringName - Table name to use for copying schema migration data
- Multiple
Admins boolRequired For Deletion - If the database requires multiple admins for deletion
- Name string
- Name of the database
- Open
Schema float64Recommendations Count - The total number of schema recommendations
- Plan string
- The database plan
- Production
Branch boolWeb Console - Whether web console is enabled for production branches
- Production
Branches float64Count - The total number of database production branches
- Ready bool
- If the database is ready to be used
- Region
Get
Databases Data Region - Require
Approval boolFor Deploy - Whether an approval is required to deploy schema changes to this database
- Resize
Queued bool - True if a branch has a queued resize request
- Resizing bool
- True if a branch is currently resizing
- Restrict
Branch boolRegion - Whether to restrict branch creation to one region
- Schema
Last stringUpdated At - When the default branch schema was last changed.
- bool
- If the database is sharded
- State string
- State of the database
- Updated
At string - When the database was last updated
- Url string
- The URL to the database API endpoint
- allow
Data BooleanBranching - Whether seeding branches with data is enabled for all branches
- at
Backup BooleanRestore Branches Limit - If the database has reached its backup restored branch limit
- at
Development BooleanBranch Usage Limit - If the database has reached its development branch limit
- automatic
Migrations Boolean - Whether to automatically manage Rails migrations during deploy requests
- branches
Count Double - The total number of database branches
- branches
Url String - The URL to retrieve this database's branches via the API
- created
At String - When the database was created
- data
Import GetDatabases Data Data Import - default
Branch String - The default branch for the database
- default
Branch DoubleRead Only Regions Count - Number of read only regions in the default branch
- default
Branch DoubleShard Count - Number of shards in the default branch
- default
Branch DoubleTable Count - Number of tables in the default branch schema
- development
Branches DoubleCount - The total number of database development branches
- foreign
Keys BooleanEnabled - Whether foreign key constraints are enabled
- html
Url String - The URL to see this database's branches in the web UI
- id String
- The ID of the database
- insights
Enabled Boolean - True if query insights is enabled for the database
- insights
Raw BooleanQueries - Whether raw SQL queries are collected
- issues
Count Double - The total number of ongoing issues within a database
- kind String
- The kind of database
- migration
Framework String - Framework used for applying migrations
- migration
Table StringName - Table name to use for copying schema migration data
- multiple
Admins BooleanRequired For Deletion - If the database requires multiple admins for deletion
- name String
- Name of the database
- open
Schema DoubleRecommendations Count - The total number of schema recommendations
- plan String
- The database plan
- production
Branch BooleanWeb Console - Whether web console is enabled for production branches
- production
Branches DoubleCount - The total number of database production branches
- ready Boolean
- If the database is ready to be used
- region
Get
Databases Data Region - require
Approval BooleanFor Deploy - Whether an approval is required to deploy schema changes to this database
- resize
Queued Boolean - True if a branch has a queued resize request
- resizing Boolean
- True if a branch is currently resizing
- restrict
Branch BooleanRegion - Whether to restrict branch creation to one region
- schema
Last StringUpdated At - When the default branch schema was last changed.
- Boolean
- If the database is sharded
- state String
- State of the database
- updated
At String - When the database was last updated
- url String
- The URL to the database API endpoint
- allow
Data booleanBranching - Whether seeding branches with data is enabled for all branches
- at
Backup booleanRestore Branches Limit - If the database has reached its backup restored branch limit
- at
Development booleanBranch Usage Limit - If the database has reached its development branch limit
- automatic
Migrations boolean - Whether to automatically manage Rails migrations during deploy requests
- branches
Count number - The total number of database branches
- branches
Url string - The URL to retrieve this database's branches via the API
- created
At string - When the database was created
- data
Import GetDatabases Data Data Import - default
Branch string - The default branch for the database
- default
Branch numberRead Only Regions Count - Number of read only regions in the default branch
- default
Branch numberShard Count - Number of shards in the default branch
- default
Branch numberTable Count - Number of tables in the default branch schema
- development
Branches numberCount - The total number of database development branches
- foreign
Keys booleanEnabled - Whether foreign key constraints are enabled
- html
Url string - The URL to see this database's branches in the web UI
- id string
- The ID of the database
- insights
Enabled boolean - True if query insights is enabled for the database
- insights
Raw booleanQueries - Whether raw SQL queries are collected
- issues
Count number - The total number of ongoing issues within a database
- kind string
- The kind of database
- migration
Framework string - Framework used for applying migrations
- migration
Table stringName - Table name to use for copying schema migration data
- multiple
Admins booleanRequired For Deletion - If the database requires multiple admins for deletion
- name string
- Name of the database
- open
Schema numberRecommendations Count - The total number of schema recommendations
- plan string
- The database plan
- production
Branch booleanWeb Console - Whether web console is enabled for production branches
- production
Branches numberCount - The total number of database production branches
- ready boolean
- If the database is ready to be used
- region
Get
Databases Data Region - require
Approval booleanFor Deploy - Whether an approval is required to deploy schema changes to this database
- resize
Queued boolean - True if a branch has a queued resize request
- resizing boolean
- True if a branch is currently resizing
- restrict
Branch booleanRegion - Whether to restrict branch creation to one region
- schema
Last stringUpdated At - When the default branch schema was last changed.
- boolean
- If the database is sharded
- state string
- State of the database
- updated
At string - When the database was last updated
- url string
- The URL to the database API endpoint
- allow_
data_ boolbranching - Whether seeding branches with data is enabled for all branches
- at_
backup_ boolrestore_ branches_ limit - If the database has reached its backup restored branch limit
- at_
development_ boolbranch_ usage_ limit - If the database has reached its development branch limit
- automatic_
migrations bool - Whether to automatically manage Rails migrations during deploy requests
- branches_
count float - The total number of database branches
- branches_
url str - The URL to retrieve this database's branches via the API
- created_
at str - When the database was created
- data_
import GetDatabases Data Data Import - default_
branch str - The default branch for the database
- default_
branch_ floatread_ only_ regions_ count - Number of read only regions in the default branch
- default_
branch_ floatshard_ count - Number of shards in the default branch
- default_
branch_ floattable_ count - Number of tables in the default branch schema
- development_
branches_ floatcount - The total number of database development branches
- foreign_
keys_ boolenabled - Whether foreign key constraints are enabled
- html_
url str - The URL to see this database's branches in the web UI
- id str
- The ID of the database
- insights_
enabled bool - True if query insights is enabled for the database
- insights_
raw_ boolqueries - Whether raw SQL queries are collected
- issues_
count float - The total number of ongoing issues within a database
- kind str
- The kind of database
- migration_
framework str - Framework used for applying migrations
- migration_
table_ strname - Table name to use for copying schema migration data
- multiple_
admins_ boolrequired_ for_ deletion - If the database requires multiple admins for deletion
- name str
- Name of the database
- open_
schema_ floatrecommendations_ count - The total number of schema recommendations
- plan str
- The database plan
- production_
branch_ boolweb_ console - Whether web console is enabled for production branches
- production_
branches_ floatcount - The total number of database production branches
- ready bool
- If the database is ready to be used
- region
Get
Databases Data Region - require_
approval_ boolfor_ deploy - Whether an approval is required to deploy schema changes to this database
- resize_
queued bool - True if a branch has a queued resize request
- resizing bool
- True if a branch is currently resizing
- restrict_
branch_ boolregion - Whether to restrict branch creation to one region
- schema_
last_ strupdated_ at - When the default branch schema was last changed.
- bool
- If the database is sharded
- state str
- State of the database
- updated_
at str - When the database was last updated
- url str
- The URL to the database API endpoint
- allow
Data BooleanBranching - Whether seeding branches with data is enabled for all branches
- at
Backup BooleanRestore Branches Limit - If the database has reached its backup restored branch limit
- at
Development BooleanBranch Usage Limit - If the database has reached its development branch limit
- automatic
Migrations Boolean - Whether to automatically manage Rails migrations during deploy requests
- branches
Count Number - The total number of database branches
- branches
Url String - The URL to retrieve this database's branches via the API
- created
At String - When the database was created
- data
Import Property Map - default
Branch String - The default branch for the database
- default
Branch NumberRead Only Regions Count - Number of read only regions in the default branch
- default
Branch NumberShard Count - Number of shards in the default branch
- default
Branch NumberTable Count - Number of tables in the default branch schema
- development
Branches NumberCount - The total number of database development branches
- foreign
Keys BooleanEnabled - Whether foreign key constraints are enabled
- html
Url String - The URL to see this database's branches in the web UI
- id String
- The ID of the database
- insights
Enabled Boolean - True if query insights is enabled for the database
- insights
Raw BooleanQueries - Whether raw SQL queries are collected
- issues
Count Number - The total number of ongoing issues within a database
- kind String
- The kind of database
- migration
Framework String - Framework used for applying migrations
- migration
Table StringName - Table name to use for copying schema migration data
- multiple
Admins BooleanRequired For Deletion - If the database requires multiple admins for deletion
- name String
- Name of the database
- open
Schema NumberRecommendations Count - The total number of schema recommendations
- plan String
- The database plan
- production
Branch BooleanWeb Console - Whether web console is enabled for production branches
- production
Branches NumberCount - The total number of database production branches
- ready Boolean
- If the database is ready to be used
- region Property Map
- require
Approval BooleanFor Deploy - Whether an approval is required to deploy schema changes to this database
- resize
Queued Boolean - True if a branch has a queued resize request
- resizing Boolean
- True if a branch is currently resizing
- restrict
Branch BooleanRegion - Whether to restrict branch creation to one region
- schema
Last StringUpdated At - When the default branch schema was last changed.
- Boolean
- If the database is sharded
- state String
- State of the database
- updated
At String - When the database was last updated
- url String
- The URL to the database API endpoint
GetDatabasesDataDataImport
- Data
Source GetDatabases Data Data Import Data Source - Finished
At string - When the import finished
- Import
Check stringErrors - Errors encountered during the import check
- Started
At string - When the import started
- State string
- State of the data import
- Data
Source GetDatabases Data Data Import Data Source - Finished
At string - When the import finished
- Import
Check stringErrors - Errors encountered during the import check
- Started
At string - When the import started
- State string
- State of the data import
- data
Source GetDatabases Data Data Import Data Source - finished
At String - When the import finished
- import
Check StringErrors - Errors encountered during the import check
- started
At String - When the import started
- state String
- State of the data import
- data
Source GetDatabases Data Data Import Data Source - finished
At string - When the import finished
- import
Check stringErrors - Errors encountered during the import check
- started
At string - When the import started
- state string
- State of the data import
- data_
source GetDatabases Data Data Import Data Source - finished_
at str - When the import finished
- import_
check_ strerrors - Errors encountered during the import check
- started_
at str - When the import started
- state str
- State of the data import
- data
Source Property Map - finished
At String - When the import finished
- import
Check StringErrors - Errors encountered during the import check
- started
At String - When the import started
- state String
- State of the data import
GetDatabasesDataDataImportDataSource
GetDatabasesDataRegion
- Current
Default bool - True if the region is the default for new branch creation
- Display
Name string - Name of the region
- Enabled bool
- Whether or not the region is currently active
- Id string
- The ID of the region
- Location string
- Location of the region
- Provider string
- Provider for the region (ex. AWS)
- Public
Ip List<string>Addresses - Public IP addresses for the region
- Slug string
- The slug of the region
- Current
Default bool - True if the region is the default for new branch creation
- Display
Name string - Name of the region
- Enabled bool
- Whether or not the region is currently active
- Id string
- The ID of the region
- Location string
- Location of the region
- Provider string
- Provider for the region (ex. AWS)
- Public
Ip []stringAddresses - Public IP addresses for the region
- Slug string
- The slug of the region
- current
Default Boolean - True if the region is the default for new branch creation
- display
Name String - Name of the region
- enabled Boolean
- Whether or not the region is currently active
- id String
- The ID of the region
- location String
- Location of the region
- provider String
- Provider for the region (ex. AWS)
- public
Ip List<String>Addresses - Public IP addresses for the region
- slug String
- The slug of the region
- current
Default boolean - True if the region is the default for new branch creation
- display
Name string - Name of the region
- enabled boolean
- Whether or not the region is currently active
- id string
- The ID of the region
- location string
- Location of the region
- provider string
- Provider for the region (ex. AWS)
- public
Ip string[]Addresses - Public IP addresses for the region
- slug string
- The slug of the region
- current_
default bool - True if the region is the default for new branch creation
- display_
name str - Name of the region
- enabled bool
- Whether or not the region is currently active
- id str
- The ID of the region
- location str
- Location of the region
- provider str
- Provider for the region (ex. AWS)
- public_
ip_ Sequence[str]addresses - Public IP addresses for the region
- slug str
- The slug of the region
- current
Default Boolean - True if the region is the default for new branch creation
- display
Name String - Name of the region
- enabled Boolean
- Whether or not the region is currently active
- id String
- The ID of the region
- location String
- Location of the region
- provider String
- Provider for the region (ex. AWS)
- public
Ip List<String>Addresses - Public IP addresses for the region
- slug String
- The slug of the region
Package Details
- Repository
- planetscale planetscale/terraform-provider-planetscale
- License
- Notes
- This Pulumi package is based on the
planetscaleTerraform Provider.
Viewing docs for planetscale 1.0.0
published on Monday, Mar 2, 2026 by planetscale
published on Monday, Mar 2, 2026 by planetscale
