1. Packages
  2. Planetscale Provider
  3. API Docs
  4. Database
planetscale 0.5.0 published on Saturday, Apr 5, 2025 by planetscale

planetscale.Database

Explore with Pulumi AI

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as planetscale from "@pulumi/planetscale";

const example = new planetscale.Database("example", {
    clusterSize: "PS_10",
    organization: "example",
});
Copy
import pulumi
import pulumi_planetscale as planetscale

example = planetscale.Database("example",
    cluster_size="PS_10",
    organization="example")
Copy
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.NewDatabase(ctx, "example", &planetscale.DatabaseArgs{
			ClusterSize:  pulumi.String("PS_10"),
			Organization: pulumi.String("example"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Planetscale = Pulumi.Planetscale;

return await Deployment.RunAsync(() => 
{
    var example = new Planetscale.Database("example", new()
    {
        ClusterSize = "PS_10",
        Organization = "example",
    });

});
Copy
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.planetscale.Database;
import com.pulumi.planetscale.DatabaseArgs;
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) {
        var example = new Database("example", DatabaseArgs.builder()
            .clusterSize("PS_10")
            .organization("example")
            .build());

    }
}
Copy
resources:
  example:
    type: planetscale:Database
    properties:
      clusterSize: PS_10
      organization: example
Copy

Create Database Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new Database(name: string, args: DatabaseArgs, opts?: CustomResourceOptions);
@overload
def Database(resource_name: str,
             args: DatabaseArgs,
             opts: Optional[ResourceOptions] = None)

@overload
def Database(resource_name: str,
             opts: Optional[ResourceOptions] = None,
             cluster_size: Optional[str] = None,
             organization: Optional[str] = None,
             migration_table_name: Optional[str] = None,
             default_branch: Optional[str] = None,
             insights_raw_queries: Optional[bool] = None,
             migration_framework: Optional[str] = None,
             allow_data_branching: Optional[bool] = None,
             name: Optional[str] = None,
             automatic_migrations: Optional[bool] = None,
             production_branch_web_console: Optional[bool] = None,
             region: Optional[str] = None,
             require_approval_for_deploy: Optional[bool] = None,
             restrict_branch_region: Optional[bool] = None)
func NewDatabase(ctx *Context, name string, args DatabaseArgs, opts ...ResourceOption) (*Database, error)
public Database(string name, DatabaseArgs args, CustomResourceOptions? opts = null)
public Database(String name, DatabaseArgs args)
public Database(String name, DatabaseArgs args, CustomResourceOptions options)
type: planetscale:Database
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. DatabaseArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. DatabaseArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. DatabaseArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. DatabaseArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. DatabaseArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var databaseResource = new Planetscale.Database("databaseResource", new()
{
    ClusterSize = "string",
    Organization = "string",
    MigrationTableName = "string",
    DefaultBranch = "string",
    InsightsRawQueries = false,
    MigrationFramework = "string",
    AllowDataBranching = false,
    Name = "string",
    AutomaticMigrations = false,
    ProductionBranchWebConsole = false,
    Region = "string",
    RequireApprovalForDeploy = false,
    RestrictBranchRegion = false,
});
Copy
example, err := planetscale.NewDatabase(ctx, "databaseResource", &planetscale.DatabaseArgs{
	ClusterSize:                pulumi.String("string"),
	Organization:               pulumi.String("string"),
	MigrationTableName:         pulumi.String("string"),
	DefaultBranch:              pulumi.String("string"),
	InsightsRawQueries:         pulumi.Bool(false),
	MigrationFramework:         pulumi.String("string"),
	AllowDataBranching:         pulumi.Bool(false),
	Name:                       pulumi.String("string"),
	AutomaticMigrations:        pulumi.Bool(false),
	ProductionBranchWebConsole: pulumi.Bool(false),
	Region:                     pulumi.String("string"),
	RequireApprovalForDeploy:   pulumi.Bool(false),
	RestrictBranchRegion:       pulumi.Bool(false),
})
Copy
var databaseResource = new Database("databaseResource", DatabaseArgs.builder()
    .clusterSize("string")
    .organization("string")
    .migrationTableName("string")
    .defaultBranch("string")
    .insightsRawQueries(false)
    .migrationFramework("string")
    .allowDataBranching(false)
    .name("string")
    .automaticMigrations(false)
    .productionBranchWebConsole(false)
    .region("string")
    .requireApprovalForDeploy(false)
    .restrictBranchRegion(false)
    .build());
Copy
database_resource = planetscale.Database("databaseResource",
    cluster_size="string",
    organization="string",
    migration_table_name="string",
    default_branch="string",
    insights_raw_queries=False,
    migration_framework="string",
    allow_data_branching=False,
    name="string",
    automatic_migrations=False,
    production_branch_web_console=False,
    region="string",
    require_approval_for_deploy=False,
    restrict_branch_region=False)
Copy
const databaseResource = new planetscale.Database("databaseResource", {
    clusterSize: "string",
    organization: "string",
    migrationTableName: "string",
    defaultBranch: "string",
    insightsRawQueries: false,
    migrationFramework: "string",
    allowDataBranching: false,
    name: "string",
    automaticMigrations: false,
    productionBranchWebConsole: false,
    region: "string",
    requireApprovalForDeploy: false,
    restrictBranchRegion: false,
});
Copy
type: planetscale:Database
properties:
    allowDataBranching: false
    automaticMigrations: false
    clusterSize: string
    defaultBranch: string
    insightsRawQueries: false
    migrationFramework: string
    migrationTableName: string
    name: string
    organization: string
    productionBranchWebConsole: false
    region: string
    requireApprovalForDeploy: false
    restrictBranchRegion: false
Copy

Database Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The Database resource accepts the following input properties:

ClusterSize This property is required. string
The default plan size of the database's branches.
Organization This property is required. string
The organization this database belongs to.
AllowDataBranching bool
Whether seeding branches with data is enabled for all branches.
AutomaticMigrations bool
Whether to automatically manage migrations during deploy requests. If true, migration_table_name and migration_framework must be set.
DefaultBranch string
The default branch for the database.
InsightsRawQueries bool
The URL to see this database's branches in the web UI.
MigrationFramework string
Framework used for applying migrations.
MigrationTableName string
Table name to use for copying schema migration data.
Name string
The name of this database.
ProductionBranchWebConsole bool
Whether web console is enabled for production branches.
Region string
The region the database lives in.
RequireApprovalForDeploy bool
Whether an approval is required to deploy schema changes to this database.
RestrictBranchRegion bool
Whether to restrict branch creation to one region.
ClusterSize This property is required. string
The default plan size of the database's branches.
Organization This property is required. string
The organization this database belongs to.
AllowDataBranching bool
Whether seeding branches with data is enabled for all branches.
AutomaticMigrations bool
Whether to automatically manage migrations during deploy requests. If true, migration_table_name and migration_framework must be set.
DefaultBranch string
The default branch for the database.
InsightsRawQueries bool
The URL to see this database's branches in the web UI.
MigrationFramework string
Framework used for applying migrations.
MigrationTableName string
Table name to use for copying schema migration data.
Name string
The name of this database.
ProductionBranchWebConsole bool
Whether web console is enabled for production branches.
Region string
The region the database lives in.
RequireApprovalForDeploy bool
Whether an approval is required to deploy schema changes to this database.
RestrictBranchRegion bool
Whether to restrict branch creation to one region.
clusterSize This property is required. String
The default plan size of the database's branches.
organization This property is required. String
The organization this database belongs to.
allowDataBranching Boolean
Whether seeding branches with data is enabled for all branches.
automaticMigrations Boolean
Whether to automatically manage migrations during deploy requests. If true, migration_table_name and migration_framework must be set.
defaultBranch String
The default branch for the database.
insightsRawQueries Boolean
The URL to see this database's branches in the web UI.
migrationFramework String
Framework used for applying migrations.
migrationTableName String
Table name to use for copying schema migration data.
name String
The name of this database.
productionBranchWebConsole Boolean
Whether web console is enabled for production branches.
region String
The region the database lives in.
requireApprovalForDeploy Boolean
Whether an approval is required to deploy schema changes to this database.
restrictBranchRegion Boolean
Whether to restrict branch creation to one region.
clusterSize This property is required. string
The default plan size of the database's branches.
organization This property is required. string
The organization this database belongs to.
allowDataBranching boolean
Whether seeding branches with data is enabled for all branches.
automaticMigrations boolean
Whether to automatically manage migrations during deploy requests. If true, migration_table_name and migration_framework must be set.
defaultBranch string
The default branch for the database.
insightsRawQueries boolean
The URL to see this database's branches in the web UI.
migrationFramework string
Framework used for applying migrations.
migrationTableName string
Table name to use for copying schema migration data.
name string
The name of this database.
productionBranchWebConsole boolean
Whether web console is enabled for production branches.
region string
The region the database lives in.
requireApprovalForDeploy boolean
Whether an approval is required to deploy schema changes to this database.
restrictBranchRegion boolean
Whether to restrict branch creation to one region.
cluster_size This property is required. str
The default plan size of the database's branches.
organization This property is required. str
The organization this database belongs to.
allow_data_branching bool
Whether seeding branches with data is enabled for all branches.
automatic_migrations bool
Whether to automatically manage migrations during deploy requests. If true, migration_table_name and migration_framework must be set.
default_branch str
The default branch for the database.
insights_raw_queries bool
The URL to see this database's branches in the web UI.
migration_framework str
Framework used for applying migrations.
migration_table_name str
Table name to use for copying schema migration data.
name str
The name of this database.
production_branch_web_console bool
Whether web console is enabled for production branches.
region str
The region the database lives in.
require_approval_for_deploy bool
Whether an approval is required to deploy schema changes to this database.
restrict_branch_region bool
Whether to restrict branch creation to one region.
clusterSize This property is required. String
The default plan size of the database's branches.
organization This property is required. String
The organization this database belongs to.
allowDataBranching Boolean
Whether seeding branches with data is enabled for all branches.
automaticMigrations Boolean
Whether to automatically manage migrations during deploy requests. If true, migration_table_name and migration_framework must be set.
defaultBranch String
The default branch for the database.
insightsRawQueries Boolean
The URL to see this database's branches in the web UI.
migrationFramework String
Framework used for applying migrations.
migrationTableName String
Table name to use for copying schema migration data.
name String
The name of this database.
productionBranchWebConsole Boolean
Whether web console is enabled for production branches.
region String
The region the database lives in.
requireApprovalForDeploy Boolean
Whether an approval is required to deploy schema changes to this database.
restrictBranchRegion Boolean
Whether to restrict branch creation to one region.

Outputs

All input properties are implicitly available as output properties. Additionally, the Database resource produces the following output properties:

AtBackupRestoreBranchesLimit bool
If the database has reached its backup restored branch limit.
AtDevelopmentBranchLimit bool
If the database has reached its development branch limit.
BranchesCount double
The total number of database branches.
BranchesUrl string
The URL to retrieve this database's branches via the API.
CreatedAt string
When the database was created.
DataImport DatabaseDataImport
If the database was created from an import, describes the import process.
DefaultBranchReadOnlyRegionsCount double
Number of read only regions in the default branch.
DefaultBranchShardCount double
Number of shards in the default branch.
DefaultBranchTableCount double
Number of tables in the default branch schema.
DevelopmentBranchesCount double
The total number of database development branches.
HtmlUrl string
The total number of database development branches.
Id string
The provider-assigned unique ID for this managed resource.
IssuesCount double
The total number of ongoing issues within a database.
MultipleAdminsRequiredForDeletion bool
If the database requires multiple admins for deletion.
Plan string
The database plan.
ProductionBranchesCount double
The total number of database production branches.
Ready bool
If the database is ready to be used.
SchemaLastUpdatedAt string
When the default branch schema was last changed.
Sharded bool
If the database is sharded.
State string
State of the database.
UpdatedAt string
When the database was last updated.
Url string
The URL to the database API endpoint.
AtBackupRestoreBranchesLimit bool
If the database has reached its backup restored branch limit.
AtDevelopmentBranchLimit bool
If the database has reached its development branch limit.
BranchesCount float64
The total number of database branches.
BranchesUrl string
The URL to retrieve this database's branches via the API.
CreatedAt string
When the database was created.
DataImport DatabaseDataImport
If the database was created from an import, describes the import process.
DefaultBranchReadOnlyRegionsCount float64
Number of read only regions in the default branch.
DefaultBranchShardCount float64
Number of shards in the default branch.
DefaultBranchTableCount float64
Number of tables in the default branch schema.
DevelopmentBranchesCount float64
The total number of database development branches.
HtmlUrl string
The total number of database development branches.
Id string
The provider-assigned unique ID for this managed resource.
IssuesCount float64
The total number of ongoing issues within a database.
MultipleAdminsRequiredForDeletion bool
If the database requires multiple admins for deletion.
Plan string
The database plan.
ProductionBranchesCount float64
The total number of database production branches.
Ready bool
If the database is ready to be used.
SchemaLastUpdatedAt string
When the default branch schema was last changed.
Sharded bool
If the database is sharded.
State string
State of the database.
UpdatedAt string
When the database was last updated.
Url string
The URL to the database API endpoint.
atBackupRestoreBranchesLimit Boolean
If the database has reached its backup restored branch limit.
atDevelopmentBranchLimit Boolean
If the database has reached its development branch limit.
branchesCount Double
The total number of database branches.
branchesUrl String
The URL to retrieve this database's branches via the API.
createdAt String
When the database was created.
dataImport DatabaseDataImport
If the database was created from an import, describes the import process.
defaultBranchReadOnlyRegionsCount Double
Number of read only regions in the default branch.
defaultBranchShardCount Double
Number of shards in the default branch.
defaultBranchTableCount Double
Number of tables in the default branch schema.
developmentBranchesCount Double
The total number of database development branches.
htmlUrl String
The total number of database development branches.
id String
The provider-assigned unique ID for this managed resource.
issuesCount Double
The total number of ongoing issues within a database.
multipleAdminsRequiredForDeletion Boolean
If the database requires multiple admins for deletion.
plan String
The database plan.
productionBranchesCount Double
The total number of database production branches.
ready Boolean
If the database is ready to be used.
schemaLastUpdatedAt String
When the default branch schema was last changed.
sharded Boolean
If the database is sharded.
state String
State of the database.
updatedAt String
When the database was last updated.
url String
The URL to the database API endpoint.
atBackupRestoreBranchesLimit boolean
If the database has reached its backup restored branch limit.
atDevelopmentBranchLimit boolean
If the database has reached its development branch limit.
branchesCount number
The total number of database branches.
branchesUrl string
The URL to retrieve this database's branches via the API.
createdAt string
When the database was created.
dataImport DatabaseDataImport
If the database was created from an import, describes the import process.
defaultBranchReadOnlyRegionsCount number
Number of read only regions in the default branch.
defaultBranchShardCount number
Number of shards in the default branch.
defaultBranchTableCount number
Number of tables in the default branch schema.
developmentBranchesCount number
The total number of database development branches.
htmlUrl string
The total number of database development branches.
id string
The provider-assigned unique ID for this managed resource.
issuesCount number
The total number of ongoing issues within a database.
multipleAdminsRequiredForDeletion boolean
If the database requires multiple admins for deletion.
plan string
The database plan.
productionBranchesCount number
The total number of database production branches.
ready boolean
If the database is ready to be used.
schemaLastUpdatedAt string
When the default branch schema was last changed.
sharded boolean
If the database is sharded.
state string
State of the database.
updatedAt string
When the database was last updated.
url string
The URL to the database API endpoint.
at_backup_restore_branches_limit bool
If the database has reached its backup restored branch limit.
at_development_branch_limit bool
If the database has reached its development branch limit.
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 DatabaseDataImport
If the database was created from an import, describes the import process.
default_branch_read_only_regions_count float
Number of read only regions in the default branch.
default_branch_shard_count float
Number of shards in the default branch.
default_branch_table_count float
Number of tables in the default branch schema.
development_branches_count float
The total number of database development branches.
html_url str
The total number of database development branches.
id str
The provider-assigned unique ID for this managed resource.
issues_count float
The total number of ongoing issues within a database.
multiple_admins_required_for_deletion bool
If the database requires multiple admins for deletion.
plan str
The database plan.
production_branches_count float
The total number of database production branches.
ready bool
If the database is ready to be used.
schema_last_updated_at str
When the default branch schema was last changed.
sharded 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.
atBackupRestoreBranchesLimit Boolean
If the database has reached its backup restored branch limit.
atDevelopmentBranchLimit Boolean
If the database has reached its development branch limit.
branchesCount Number
The total number of database branches.
branchesUrl String
The URL to retrieve this database's branches via the API.
createdAt String
When the database was created.
dataImport Property Map
If the database was created from an import, describes the import process.
defaultBranchReadOnlyRegionsCount Number
Number of read only regions in the default branch.
defaultBranchShardCount Number
Number of shards in the default branch.
defaultBranchTableCount Number
Number of tables in the default branch schema.
developmentBranchesCount Number
The total number of database development branches.
htmlUrl String
The total number of database development branches.
id String
The provider-assigned unique ID for this managed resource.
issuesCount Number
The total number of ongoing issues within a database.
multipleAdminsRequiredForDeletion Boolean
If the database requires multiple admins for deletion.
plan String
The database plan.
productionBranchesCount Number
The total number of database production branches.
ready Boolean
If the database is ready to be used.
schemaLastUpdatedAt String
When the default branch schema was last changed.
sharded Boolean
If the database is sharded.
state String
State of the database.
updatedAt String
When the database was last updated.
url String
The URL to the database API endpoint.

Look up Existing Database Resource

Get an existing Database resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: DatabaseState, opts?: CustomResourceOptions): Database
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        allow_data_branching: Optional[bool] = None,
        at_backup_restore_branches_limit: Optional[bool] = None,
        at_development_branch_limit: Optional[bool] = None,
        automatic_migrations: Optional[bool] = None,
        branches_count: Optional[float] = None,
        branches_url: Optional[str] = None,
        cluster_size: Optional[str] = None,
        created_at: Optional[str] = None,
        data_import: Optional[DatabaseDataImportArgs] = None,
        default_branch: Optional[str] = None,
        default_branch_read_only_regions_count: Optional[float] = None,
        default_branch_shard_count: Optional[float] = None,
        default_branch_table_count: Optional[float] = None,
        development_branches_count: Optional[float] = None,
        html_url: Optional[str] = None,
        insights_raw_queries: Optional[bool] = None,
        issues_count: Optional[float] = None,
        migration_framework: Optional[str] = None,
        migration_table_name: Optional[str] = None,
        multiple_admins_required_for_deletion: Optional[bool] = None,
        name: Optional[str] = None,
        organization: Optional[str] = None,
        plan: Optional[str] = None,
        production_branch_web_console: Optional[bool] = None,
        production_branches_count: Optional[float] = None,
        ready: Optional[bool] = None,
        region: Optional[str] = None,
        require_approval_for_deploy: Optional[bool] = None,
        restrict_branch_region: Optional[bool] = None,
        schema_last_updated_at: Optional[str] = None,
        sharded: Optional[bool] = None,
        state: Optional[str] = None,
        updated_at: Optional[str] = None,
        url: Optional[str] = None) -> Database
func GetDatabase(ctx *Context, name string, id IDInput, state *DatabaseState, opts ...ResourceOption) (*Database, error)
public static Database Get(string name, Input<string> id, DatabaseState? state, CustomResourceOptions? opts = null)
public static Database get(String name, Output<String> id, DatabaseState state, CustomResourceOptions options)
resources:  _:    type: planetscale:Database    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
AllowDataBranching bool
Whether seeding branches with data is enabled for all branches.
AtBackupRestoreBranchesLimit bool
If the database has reached its backup restored branch limit.
AtDevelopmentBranchLimit bool
If the database has reached its development branch limit.
AutomaticMigrations bool
Whether to automatically manage migrations during deploy requests. If true, migration_table_name and migration_framework must be set.
BranchesCount double
The total number of database branches.
BranchesUrl string
The URL to retrieve this database's branches via the API.
ClusterSize string
The default plan size of the database's branches.
CreatedAt string
When the database was created.
DataImport DatabaseDataImport
If the database was created from an import, describes the import process.
DefaultBranch string
The default branch for the database.
DefaultBranchReadOnlyRegionsCount double
Number of read only regions in the default branch.
DefaultBranchShardCount double
Number of shards in the default branch.
DefaultBranchTableCount double
Number of tables in the default branch schema.
DevelopmentBranchesCount double
The total number of database development branches.
HtmlUrl string
The total number of database development branches.
InsightsRawQueries bool
The URL to see this database's branches in the web UI.
IssuesCount double
The total number of ongoing issues within a database.
MigrationFramework string
Framework used for applying migrations.
MigrationTableName string
Table name to use for copying schema migration data.
MultipleAdminsRequiredForDeletion bool
If the database requires multiple admins for deletion.
Name string
The name of this database.
Organization string
The organization this database belongs to.
Plan string
The database plan.
ProductionBranchWebConsole bool
Whether web console is enabled for production branches.
ProductionBranchesCount double
The total number of database production branches.
Ready bool
If the database is ready to be used.
Region string
The region the database lives in.
RequireApprovalForDeploy bool
Whether an approval is required to deploy schema changes to this database.
RestrictBranchRegion bool
Whether to restrict branch creation to one region.
SchemaLastUpdatedAt string
When the default branch schema was last changed.
Sharded bool
If the database is sharded.
State string
State of the database.
UpdatedAt string
When the database was last updated.
Url string
The URL to the database API endpoint.
AllowDataBranching bool
Whether seeding branches with data is enabled for all branches.
AtBackupRestoreBranchesLimit bool
If the database has reached its backup restored branch limit.
AtDevelopmentBranchLimit bool
If the database has reached its development branch limit.
AutomaticMigrations bool
Whether to automatically manage migrations during deploy requests. If true, migration_table_name and migration_framework must be set.
BranchesCount float64
The total number of database branches.
BranchesUrl string
The URL to retrieve this database's branches via the API.
ClusterSize string
The default plan size of the database's branches.
CreatedAt string
When the database was created.
DataImport DatabaseDataImportArgs
If the database was created from an import, describes the import process.
DefaultBranch string
The default branch for the database.
DefaultBranchReadOnlyRegionsCount float64
Number of read only regions in the default branch.
DefaultBranchShardCount float64
Number of shards in the default branch.
DefaultBranchTableCount float64
Number of tables in the default branch schema.
DevelopmentBranchesCount float64
The total number of database development branches.
HtmlUrl string
The total number of database development branches.
InsightsRawQueries bool
The URL to see this database's branches in the web UI.
IssuesCount float64
The total number of ongoing issues within a database.
MigrationFramework string
Framework used for applying migrations.
MigrationTableName string
Table name to use for copying schema migration data.
MultipleAdminsRequiredForDeletion bool
If the database requires multiple admins for deletion.
Name string
The name of this database.
Organization string
The organization this database belongs to.
Plan string
The database plan.
ProductionBranchWebConsole bool
Whether web console is enabled for production branches.
ProductionBranchesCount float64
The total number of database production branches.
Ready bool
If the database is ready to be used.
Region string
The region the database lives in.
RequireApprovalForDeploy bool
Whether an approval is required to deploy schema changes to this database.
RestrictBranchRegion bool
Whether to restrict branch creation to one region.
SchemaLastUpdatedAt string
When the default branch schema was last changed.
Sharded bool
If the database is sharded.
State string
State of the database.
UpdatedAt string
When the database was last updated.
Url string
The URL to the database API endpoint.
allowDataBranching Boolean
Whether seeding branches with data is enabled for all branches.
atBackupRestoreBranchesLimit Boolean
If the database has reached its backup restored branch limit.
atDevelopmentBranchLimit Boolean
If the database has reached its development branch limit.
automaticMigrations Boolean
Whether to automatically manage migrations during deploy requests. If true, migration_table_name and migration_framework must be set.
branchesCount Double
The total number of database branches.
branchesUrl String
The URL to retrieve this database's branches via the API.
clusterSize String
The default plan size of the database's branches.
createdAt String
When the database was created.
dataImport DatabaseDataImport
If the database was created from an import, describes the import process.
defaultBranch String
The default branch for the database.
defaultBranchReadOnlyRegionsCount Double
Number of read only regions in the default branch.
defaultBranchShardCount Double
Number of shards in the default branch.
defaultBranchTableCount Double
Number of tables in the default branch schema.
developmentBranchesCount Double
The total number of database development branches.
htmlUrl String
The total number of database development branches.
insightsRawQueries Boolean
The URL to see this database's branches in the web UI.
issuesCount Double
The total number of ongoing issues within a database.
migrationFramework String
Framework used for applying migrations.
migrationTableName String
Table name to use for copying schema migration data.
multipleAdminsRequiredForDeletion Boolean
If the database requires multiple admins for deletion.
name String
The name of this database.
organization String
The organization this database belongs to.
plan String
The database plan.
productionBranchWebConsole Boolean
Whether web console is enabled for production branches.
productionBranchesCount Double
The total number of database production branches.
ready Boolean
If the database is ready to be used.
region String
The region the database lives in.
requireApprovalForDeploy Boolean
Whether an approval is required to deploy schema changes to this database.
restrictBranchRegion Boolean
Whether to restrict branch creation to one region.
schemaLastUpdatedAt String
When the default branch schema was last changed.
sharded Boolean
If the database is sharded.
state String
State of the database.
updatedAt String
When the database was last updated.
url String
The URL to the database API endpoint.
allowDataBranching boolean
Whether seeding branches with data is enabled for all branches.
atBackupRestoreBranchesLimit boolean
If the database has reached its backup restored branch limit.
atDevelopmentBranchLimit boolean
If the database has reached its development branch limit.
automaticMigrations boolean
Whether to automatically manage migrations during deploy requests. If true, migration_table_name and migration_framework must be set.
branchesCount number
The total number of database branches.
branchesUrl string
The URL to retrieve this database's branches via the API.
clusterSize string
The default plan size of the database's branches.
createdAt string
When the database was created.
dataImport DatabaseDataImport
If the database was created from an import, describes the import process.
defaultBranch string
The default branch for the database.
defaultBranchReadOnlyRegionsCount number
Number of read only regions in the default branch.
defaultBranchShardCount number
Number of shards in the default branch.
defaultBranchTableCount number
Number of tables in the default branch schema.
developmentBranchesCount number
The total number of database development branches.
htmlUrl string
The total number of database development branches.
insightsRawQueries boolean
The URL to see this database's branches in the web UI.
issuesCount number
The total number of ongoing issues within a database.
migrationFramework string
Framework used for applying migrations.
migrationTableName string
Table name to use for copying schema migration data.
multipleAdminsRequiredForDeletion boolean
If the database requires multiple admins for deletion.
name string
The name of this database.
organization string
The organization this database belongs to.
plan string
The database plan.
productionBranchWebConsole boolean
Whether web console is enabled for production branches.
productionBranchesCount number
The total number of database production branches.
ready boolean
If the database is ready to be used.
region string
The region the database lives in.
requireApprovalForDeploy boolean
Whether an approval is required to deploy schema changes to this database.
restrictBranchRegion boolean
Whether to restrict branch creation to one region.
schemaLastUpdatedAt string
When the default branch schema was last changed.
sharded boolean
If the database is sharded.
state string
State of the database.
updatedAt string
When the database was last updated.
url string
The URL to the database API endpoint.
allow_data_branching bool
Whether seeding branches with data is enabled for all branches.
at_backup_restore_branches_limit bool
If the database has reached its backup restored branch limit.
at_development_branch_limit bool
If the database has reached its development branch limit.
automatic_migrations bool
Whether to automatically manage migrations during deploy requests. If true, migration_table_name and migration_framework must be set.
branches_count float
The total number of database branches.
branches_url str
The URL to retrieve this database's branches via the API.
cluster_size str
The default plan size of the database's branches.
created_at str
When the database was created.
data_import DatabaseDataImportArgs
If the database was created from an import, describes the import process.
default_branch str
The default branch for the database.
default_branch_read_only_regions_count float
Number of read only regions in the default branch.
default_branch_shard_count float
Number of shards in the default branch.
default_branch_table_count float
Number of tables in the default branch schema.
development_branches_count float
The total number of database development branches.
html_url str
The total number of database development branches.
insights_raw_queries bool
The URL to see this database's branches in the web UI.
issues_count float
The total number of ongoing issues within a database.
migration_framework str
Framework used for applying migrations.
migration_table_name str
Table name to use for copying schema migration data.
multiple_admins_required_for_deletion bool
If the database requires multiple admins for deletion.
name str
The name of this database.
organization str
The organization this database belongs to.
plan str
The database plan.
production_branch_web_console bool
Whether web console is enabled for production branches.
production_branches_count float
The total number of database production branches.
ready bool
If the database is ready to be used.
region str
The region the database lives in.
require_approval_for_deploy bool
Whether an approval is required to deploy schema changes to this database.
restrict_branch_region bool
Whether to restrict branch creation to one region.
schema_last_updated_at str
When the default branch schema was last changed.
sharded 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.
allowDataBranching Boolean
Whether seeding branches with data is enabled for all branches.
atBackupRestoreBranchesLimit Boolean
If the database has reached its backup restored branch limit.
atDevelopmentBranchLimit Boolean
If the database has reached its development branch limit.
automaticMigrations Boolean
Whether to automatically manage migrations during deploy requests. If true, migration_table_name and migration_framework must be set.
branchesCount Number
The total number of database branches.
branchesUrl String
The URL to retrieve this database's branches via the API.
clusterSize String
The default plan size of the database's branches.
createdAt String
When the database was created.
dataImport Property Map
If the database was created from an import, describes the import process.
defaultBranch String
The default branch for the database.
defaultBranchReadOnlyRegionsCount Number
Number of read only regions in the default branch.
defaultBranchShardCount Number
Number of shards in the default branch.
defaultBranchTableCount Number
Number of tables in the default branch schema.
developmentBranchesCount Number
The total number of database development branches.
htmlUrl String
The total number of database development branches.
insightsRawQueries Boolean
The URL to see this database's branches in the web UI.
issuesCount Number
The total number of ongoing issues within a database.
migrationFramework String
Framework used for applying migrations.
migrationTableName String
Table name to use for copying schema migration data.
multipleAdminsRequiredForDeletion Boolean
If the database requires multiple admins for deletion.
name String
The name of this database.
organization String
The organization this database belongs to.
plan String
The database plan.
productionBranchWebConsole Boolean
Whether web console is enabled for production branches.
productionBranchesCount Number
The total number of database production branches.
ready Boolean
If the database is ready to be used.
region String
The region the database lives in.
requireApprovalForDeploy Boolean
Whether an approval is required to deploy schema changes to this database.
restrictBranchRegion Boolean
Whether to restrict branch creation to one region.
schemaLastUpdatedAt String
When the default branch schema was last changed.
sharded Boolean
If the database is sharded.
state String
State of the database.
updatedAt String
When the database was last updated.
url String
The URL to the database API endpoint.

Supporting Types

DatabaseDataImport
, DatabaseDataImportArgs

DataSource DatabaseDataImportDataSource
Connection information for the source of the data for the import.
FinishedAt string
When the import finished.
ImportCheckErrors string
Errors encountered while preparing the import.
StartedAt string
When the import started.
State string
The state of the import, one of: pending, queued, in_progress, complete, cancelled, error.
DataSource DatabaseDataImportDataSource
Connection information for the source of the data for the import.
FinishedAt string
When the import finished.
ImportCheckErrors string
Errors encountered while preparing the import.
StartedAt string
When the import started.
State string
The state of the import, one of: pending, queued, in_progress, complete, cancelled, error.
dataSource DatabaseDataImportDataSource
Connection information for the source of the data for the import.
finishedAt String
When the import finished.
importCheckErrors String
Errors encountered while preparing the import.
startedAt String
When the import started.
state String
The state of the import, one of: pending, queued, in_progress, complete, cancelled, error.
dataSource DatabaseDataImportDataSource
Connection information for the source of the data for the import.
finishedAt string
When the import finished.
importCheckErrors string
Errors encountered while preparing the import.
startedAt string
When the import started.
state string
The state of the import, one of: pending, queued, in_progress, complete, cancelled, error.
data_source DatabaseDataImportDataSource
Connection information for the source of the data for the import.
finished_at str
When the import finished.
import_check_errors str
Errors encountered while preparing the import.
started_at str
When the import started.
state str
The state of the import, one of: pending, queued, in_progress, complete, cancelled, error.
dataSource Property Map
Connection information for the source of the data for the import.
finishedAt String
When the import finished.
importCheckErrors String
Errors encountered while preparing the import.
startedAt String
When the import started.
state String
The state of the import, one of: pending, queued, in_progress, complete, cancelled, error.

DatabaseDataImportDataSource
, DatabaseDataImportDataSourceArgs

Database This property is required. string
The name of the database imported from.
Hostname This property is required. string
The hostname where the database lives.
Port This property is required. string
The port on which the database listens on the host.
Database This property is required. string
The name of the database imported from.
Hostname This property is required. string
The hostname where the database lives.
Port This property is required. string
The port on which the database listens on the host.
database This property is required. String
The name of the database imported from.
hostname This property is required. String
The hostname where the database lives.
port This property is required. String
The port on which the database listens on the host.
database This property is required. string
The name of the database imported from.
hostname This property is required. string
The hostname where the database lives.
port This property is required. string
The port on which the database listens on the host.
database This property is required. str
The name of the database imported from.
hostname This property is required. str
The hostname where the database lives.
port This property is required. str
The port on which the database listens on the host.
database This property is required. String
The name of the database imported from.
hostname This property is required. String
The hostname where the database lives.
port This property is required. String
The port on which the database listens on the host.

Import

Databases can be imported using “org,database” as the identifier.

$ pulumi import planetscale:index/database:Database example "org,database"
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
planetscale planetscale/terraform-provider-planetscale
License
Notes
This Pulumi package is based on the planetscale Terraform Provider.