1. Packages
  2. Planetscale Provider
  3. API Docs
  4. PostgresBranch
planetscale 1.0.0-rc1 published on Friday, Jan 30, 2026 by planetscale
planetscale logo
planetscale 1.0.0-rc1 published on Friday, Jan 30, 2026 by planetscale

    PostgresBranch Resource

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as planetscale from "@pulumi/planetscale";
    
    const myPostgresbranch = new planetscale.PostgresBranch("my_postgresbranch", {
        organization: "my-organization",
        database: "ru00w3vqvfr9",
        name: "my-branch",
        clusterSize: "PS-10",
    });
    
    import pulumi
    import pulumi_planetscale as planetscale
    
    my_postgresbranch = planetscale.PostgresBranch("my_postgresbranch",
        organization="my-organization",
        database="ru00w3vqvfr9",
        name="my-branch",
        cluster_size="PS-10")
    
    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.NewPostgresBranch(ctx, "my_postgresbranch", &planetscale.PostgresBranchArgs{
    			Organization: pulumi.String("my-organization"),
    			Database:     pulumi.String("ru00w3vqvfr9"),
    			Name:         pulumi.String("my-branch"),
    			ClusterSize:  pulumi.String("PS-10"),
    		})
    		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 myPostgresbranch = new Planetscale.PostgresBranch("my_postgresbranch", new()
        {
            Organization = "my-organization",
            Database = "ru00w3vqvfr9",
            Name = "my-branch",
            ClusterSize = "PS-10",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.planetscale.PostgresBranch;
    import com.pulumi.planetscale.PostgresBranchArgs;
    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 myPostgresbranch = new PostgresBranch("myPostgresbranch", PostgresBranchArgs.builder()
                .organization("my-organization")
                .database("ru00w3vqvfr9")
                .name("my-branch")
                .clusterSize("PS-10")
                .build());
    
        }
    }
    
    resources:
      myPostgresbranch:
        type: planetscale:PostgresBranch
        name: my_postgresbranch
        properties:
          organization: my-organization
          database: ru00w3vqvfr9
          name: my-branch
          clusterSize: PS-10
    

    Create PostgresBranch Resource

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

    Constructor syntax

    new PostgresBranch(name: string, args: PostgresBranchArgs, opts?: CustomResourceOptions);
    @overload
    def PostgresBranch(resource_name: str,
                       args: PostgresBranchArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def PostgresBranch(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       database: Optional[str] = None,
                       organization: Optional[str] = None,
                       backup_id: Optional[str] = None,
                       cluster_size: Optional[str] = None,
                       major_version: Optional[str] = None,
                       name: Optional[str] = None,
                       parent_branch: Optional[str] = None,
                       region: Optional[str] = None,
                       restore_point: Optional[str] = None)
    func NewPostgresBranch(ctx *Context, name string, args PostgresBranchArgs, opts ...ResourceOption) (*PostgresBranch, error)
    public PostgresBranch(string name, PostgresBranchArgs args, CustomResourceOptions? opts = null)
    public PostgresBranch(String name, PostgresBranchArgs args)
    public PostgresBranch(String name, PostgresBranchArgs args, CustomResourceOptions options)
    
    type: planetscale:PostgresBranch
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args PostgresBranchArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args PostgresBranchArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args PostgresBranchArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args PostgresBranchArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args PostgresBranchArgs
    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 postgresBranchResource = new Planetscale.PostgresBranch("postgresBranchResource", new()
    {
        Database = "string",
        Organization = "string",
        BackupId = "string",
        ClusterSize = "string",
        MajorVersion = "string",
        Name = "string",
        ParentBranch = "string",
        Region = "string",
        RestorePoint = "string",
    });
    
    example, err := planetscale.NewPostgresBranch(ctx, "postgresBranchResource", &planetscale.PostgresBranchArgs{
    	Database:     pulumi.String("string"),
    	Organization: pulumi.String("string"),
    	BackupId:     pulumi.String("string"),
    	ClusterSize:  pulumi.String("string"),
    	MajorVersion: pulumi.String("string"),
    	Name:         pulumi.String("string"),
    	ParentBranch: pulumi.String("string"),
    	Region:       pulumi.String("string"),
    	RestorePoint: pulumi.String("string"),
    })
    
    var postgresBranchResource = new PostgresBranch("postgresBranchResource", PostgresBranchArgs.builder()
        .database("string")
        .organization("string")
        .backupId("string")
        .clusterSize("string")
        .majorVersion("string")
        .name("string")
        .parentBranch("string")
        .region("string")
        .restorePoint("string")
        .build());
    
    postgres_branch_resource = planetscale.PostgresBranch("postgresBranchResource",
        database="string",
        organization="string",
        backup_id="string",
        cluster_size="string",
        major_version="string",
        name="string",
        parent_branch="string",
        region="string",
        restore_point="string")
    
    const postgresBranchResource = new planetscale.PostgresBranch("postgresBranchResource", {
        database: "string",
        organization: "string",
        backupId: "string",
        clusterSize: "string",
        majorVersion: "string",
        name: "string",
        parentBranch: "string",
        region: "string",
        restorePoint: "string",
    });
    
    type: planetscale:PostgresBranch
    properties:
        backupId: string
        clusterSize: string
        database: string
        majorVersion: string
        name: string
        organization: string
        parentBranch: string
        region: string
        restorePoint: string
    

    PostgresBranch 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 PostgresBranch resource accepts the following input properties:

    Database string
    The name of the database the branch belongs to
    Organization string
    The name of the organization the branch belongs to
    BackupId string
    If provided, restores the backup's schema and data to the new branch. Must have restore_production_branch_backup(s) or restore_backup(s) access to do this. Requires replacement if changed.
    ClusterSize string
    The database cluster size. Required if a backupid is provided, optional otherwise. Options: PS10, PS20, PS40, ..., PS_2800. Requires replacement if changed.
    MajorVersion string
    For PostgreSQL databases, the PostgreSQL major version to use for the branch. Defaults to the major version of the parent branch if it exists or the database's default branch major version. Ignored for branches restored from backups. Requires replacement if changed.
    Name string
    The name of the branch to create
    ParentBranch string
    The name of the parent branch. Defaults to the database's default branch if not provided. Requires replacement if changed.
    Region string
    The region to create the branch in. If not provided, the branch will be created in the default region for its database. Requires replacement if changed.
    RestorePoint string
    Restore from a point-in-time recovery timestamp (e.g. 2023-01-01T00:00:00Z). Available only for PostgreSQL databases. Requires replacement if changed.
    Database string
    The name of the database the branch belongs to
    Organization string
    The name of the organization the branch belongs to
    BackupId string
    If provided, restores the backup's schema and data to the new branch. Must have restore_production_branch_backup(s) or restore_backup(s) access to do this. Requires replacement if changed.
    ClusterSize string
    The database cluster size. Required if a backupid is provided, optional otherwise. Options: PS10, PS20, PS40, ..., PS_2800. Requires replacement if changed.
    MajorVersion string
    For PostgreSQL databases, the PostgreSQL major version to use for the branch. Defaults to the major version of the parent branch if it exists or the database's default branch major version. Ignored for branches restored from backups. Requires replacement if changed.
    Name string
    The name of the branch to create
    ParentBranch string
    The name of the parent branch. Defaults to the database's default branch if not provided. Requires replacement if changed.
    Region string
    The region to create the branch in. If not provided, the branch will be created in the default region for its database. Requires replacement if changed.
    RestorePoint string
    Restore from a point-in-time recovery timestamp (e.g. 2023-01-01T00:00:00Z). Available only for PostgreSQL databases. Requires replacement if changed.
    database String
    The name of the database the branch belongs to
    organization String
    The name of the organization the branch belongs to
    backupId String
    If provided, restores the backup's schema and data to the new branch. Must have restore_production_branch_backup(s) or restore_backup(s) access to do this. Requires replacement if changed.
    clusterSize String
    The database cluster size. Required if a backupid is provided, optional otherwise. Options: PS10, PS20, PS40, ..., PS_2800. Requires replacement if changed.
    majorVersion String
    For PostgreSQL databases, the PostgreSQL major version to use for the branch. Defaults to the major version of the parent branch if it exists or the database's default branch major version. Ignored for branches restored from backups. Requires replacement if changed.
    name String
    The name of the branch to create
    parentBranch String
    The name of the parent branch. Defaults to the database's default branch if not provided. Requires replacement if changed.
    region String
    The region to create the branch in. If not provided, the branch will be created in the default region for its database. Requires replacement if changed.
    restorePoint String
    Restore from a point-in-time recovery timestamp (e.g. 2023-01-01T00:00:00Z). Available only for PostgreSQL databases. Requires replacement if changed.
    database string
    The name of the database the branch belongs to
    organization string
    The name of the organization the branch belongs to
    backupId string
    If provided, restores the backup's schema and data to the new branch. Must have restore_production_branch_backup(s) or restore_backup(s) access to do this. Requires replacement if changed.
    clusterSize string
    The database cluster size. Required if a backupid is provided, optional otherwise. Options: PS10, PS20, PS40, ..., PS_2800. Requires replacement if changed.
    majorVersion string
    For PostgreSQL databases, the PostgreSQL major version to use for the branch. Defaults to the major version of the parent branch if it exists or the database's default branch major version. Ignored for branches restored from backups. Requires replacement if changed.
    name string
    The name of the branch to create
    parentBranch string
    The name of the parent branch. Defaults to the database's default branch if not provided. Requires replacement if changed.
    region string
    The region to create the branch in. If not provided, the branch will be created in the default region for its database. Requires replacement if changed.
    restorePoint string
    Restore from a point-in-time recovery timestamp (e.g. 2023-01-01T00:00:00Z). Available only for PostgreSQL databases. Requires replacement if changed.
    database str
    The name of the database the branch belongs to
    organization str
    The name of the organization the branch belongs to
    backup_id str
    If provided, restores the backup's schema and data to the new branch. Must have restore_production_branch_backup(s) or restore_backup(s) access to do this. Requires replacement if changed.
    cluster_size str
    The database cluster size. Required if a backupid is provided, optional otherwise. Options: PS10, PS20, PS40, ..., PS_2800. Requires replacement if changed.
    major_version str
    For PostgreSQL databases, the PostgreSQL major version to use for the branch. Defaults to the major version of the parent branch if it exists or the database's default branch major version. Ignored for branches restored from backups. Requires replacement if changed.
    name str
    The name of the branch to create
    parent_branch str
    The name of the parent branch. Defaults to the database's default branch if not provided. Requires replacement if changed.
    region str
    The region to create the branch in. If not provided, the branch will be created in the default region for its database. Requires replacement if changed.
    restore_point str
    Restore from a point-in-time recovery timestamp (e.g. 2023-01-01T00:00:00Z). Available only for PostgreSQL databases. Requires replacement if changed.
    database String
    The name of the database the branch belongs to
    organization String
    The name of the organization the branch belongs to
    backupId String
    If provided, restores the backup's schema and data to the new branch. Must have restore_production_branch_backup(s) or restore_backup(s) access to do this. Requires replacement if changed.
    clusterSize String
    The database cluster size. Required if a backupid is provided, optional otherwise. Options: PS10, PS20, PS40, ..., PS_2800. Requires replacement if changed.
    majorVersion String
    For PostgreSQL databases, the PostgreSQL major version to use for the branch. Defaults to the major version of the parent branch if it exists or the database's default branch major version. Ignored for branches restored from backups. Requires replacement if changed.
    name String
    The name of the branch to create
    parentBranch String
    The name of the parent branch. Defaults to the database's default branch if not provided. Requires replacement if changed.
    region String
    The region to create the branch in. If not provided, the branch will be created in the default region for its database. Requires replacement if changed.
    restorePoint String
    Restore from a point-in-time recovery timestamp (e.g. 2023-01-01T00:00:00Z). Available only for PostgreSQL databases. Requires replacement if changed.

    Outputs

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

    Actor PostgresBranchActor
    ClusterName string
    The SKU representing the branch's cluster size
    HtmlUrl string
    Planetscale app URL for the branch
    Id string
    The provider-assigned unique ID for this managed resource.
    Ready bool
    Whether or not the branch is ready to serve queries
    RegionData PostgresBranchRegionData
    Replicas double
    The number of replicas for the branch
    State string
    The current state of the branch
    Url string
    Planetscale API URL for the branch
    Actor PostgresBranchActor
    ClusterName string
    The SKU representing the branch's cluster size
    HtmlUrl string
    Planetscale app URL for the branch
    Id string
    The provider-assigned unique ID for this managed resource.
    Ready bool
    Whether or not the branch is ready to serve queries
    RegionData PostgresBranchRegionData
    Replicas float64
    The number of replicas for the branch
    State string
    The current state of the branch
    Url string
    Planetscale API URL for the branch
    actor PostgresBranchActor
    clusterName String
    The SKU representing the branch's cluster size
    htmlUrl String
    Planetscale app URL for the branch
    id String
    The provider-assigned unique ID for this managed resource.
    ready Boolean
    Whether or not the branch is ready to serve queries
    regionData PostgresBranchRegionData
    replicas Double
    The number of replicas for the branch
    state String
    The current state of the branch
    url String
    Planetscale API URL for the branch
    actor PostgresBranchActor
    clusterName string
    The SKU representing the branch's cluster size
    htmlUrl string
    Planetscale app URL for the branch
    id string
    The provider-assigned unique ID for this managed resource.
    ready boolean
    Whether or not the branch is ready to serve queries
    regionData PostgresBranchRegionData
    replicas number
    The number of replicas for the branch
    state string
    The current state of the branch
    url string
    Planetscale API URL for the branch
    actor PostgresBranchActor
    cluster_name str
    The SKU representing the branch's cluster size
    html_url str
    Planetscale app URL for the branch
    id str
    The provider-assigned unique ID for this managed resource.
    ready bool
    Whether or not the branch is ready to serve queries
    region_data PostgresBranchRegionData
    replicas float
    The number of replicas for the branch
    state str
    The current state of the branch
    url str
    Planetscale API URL for the branch
    actor Property Map
    clusterName String
    The SKU representing the branch's cluster size
    htmlUrl String
    Planetscale app URL for the branch
    id String
    The provider-assigned unique ID for this managed resource.
    ready Boolean
    Whether or not the branch is ready to serve queries
    regionData Property Map
    replicas Number
    The number of replicas for the branch
    state String
    The current state of the branch
    url String
    Planetscale API URL for the branch

    Look up Existing PostgresBranch Resource

    Get an existing PostgresBranch 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?: PostgresBranchState, opts?: CustomResourceOptions): PostgresBranch
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            actor: Optional[PostgresBranchActorArgs] = None,
            backup_id: Optional[str] = None,
            cluster_name: Optional[str] = None,
            cluster_size: Optional[str] = None,
            database: Optional[str] = None,
            html_url: Optional[str] = None,
            major_version: Optional[str] = None,
            name: Optional[str] = None,
            organization: Optional[str] = None,
            parent_branch: Optional[str] = None,
            ready: Optional[bool] = None,
            region: Optional[str] = None,
            region_data: Optional[PostgresBranchRegionDataArgs] = None,
            replicas: Optional[float] = None,
            restore_point: Optional[str] = None,
            state: Optional[str] = None,
            url: Optional[str] = None) -> PostgresBranch
    func GetPostgresBranch(ctx *Context, name string, id IDInput, state *PostgresBranchState, opts ...ResourceOption) (*PostgresBranch, error)
    public static PostgresBranch Get(string name, Input<string> id, PostgresBranchState? state, CustomResourceOptions? opts = null)
    public static PostgresBranch get(String name, Output<String> id, PostgresBranchState state, CustomResourceOptions options)
    resources:  _:    type: planetscale:PostgresBranch    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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:
    Actor PostgresBranchActor
    BackupId string
    If provided, restores the backup's schema and data to the new branch. Must have restore_production_branch_backup(s) or restore_backup(s) access to do this. Requires replacement if changed.
    ClusterName string
    The SKU representing the branch's cluster size
    ClusterSize string
    The database cluster size. Required if a backupid is provided, optional otherwise. Options: PS10, PS20, PS40, ..., PS_2800. Requires replacement if changed.
    Database string
    The name of the database the branch belongs to
    HtmlUrl string
    Planetscale app URL for the branch
    MajorVersion string
    For PostgreSQL databases, the PostgreSQL major version to use for the branch. Defaults to the major version of the parent branch if it exists or the database's default branch major version. Ignored for branches restored from backups. Requires replacement if changed.
    Name string
    The name of the branch to create
    Organization string
    The name of the organization the branch belongs to
    ParentBranch string
    The name of the parent branch. Defaults to the database's default branch if not provided. Requires replacement if changed.
    Ready bool
    Whether or not the branch is ready to serve queries
    Region string
    The region to create the branch in. If not provided, the branch will be created in the default region for its database. Requires replacement if changed.
    RegionData PostgresBranchRegionData
    Replicas double
    The number of replicas for the branch
    RestorePoint string
    Restore from a point-in-time recovery timestamp (e.g. 2023-01-01T00:00:00Z). Available only for PostgreSQL databases. Requires replacement if changed.
    State string
    The current state of the branch
    Url string
    Planetscale API URL for the branch
    Actor PostgresBranchActorArgs
    BackupId string
    If provided, restores the backup's schema and data to the new branch. Must have restore_production_branch_backup(s) or restore_backup(s) access to do this. Requires replacement if changed.
    ClusterName string
    The SKU representing the branch's cluster size
    ClusterSize string
    The database cluster size. Required if a backupid is provided, optional otherwise. Options: PS10, PS20, PS40, ..., PS_2800. Requires replacement if changed.
    Database string
    The name of the database the branch belongs to
    HtmlUrl string
    Planetscale app URL for the branch
    MajorVersion string
    For PostgreSQL databases, the PostgreSQL major version to use for the branch. Defaults to the major version of the parent branch if it exists or the database's default branch major version. Ignored for branches restored from backups. Requires replacement if changed.
    Name string
    The name of the branch to create
    Organization string
    The name of the organization the branch belongs to
    ParentBranch string
    The name of the parent branch. Defaults to the database's default branch if not provided. Requires replacement if changed.
    Ready bool
    Whether or not the branch is ready to serve queries
    Region string
    The region to create the branch in. If not provided, the branch will be created in the default region for its database. Requires replacement if changed.
    RegionData PostgresBranchRegionDataArgs
    Replicas float64
    The number of replicas for the branch
    RestorePoint string
    Restore from a point-in-time recovery timestamp (e.g. 2023-01-01T00:00:00Z). Available only for PostgreSQL databases. Requires replacement if changed.
    State string
    The current state of the branch
    Url string
    Planetscale API URL for the branch
    actor PostgresBranchActor
    backupId String
    If provided, restores the backup's schema and data to the new branch. Must have restore_production_branch_backup(s) or restore_backup(s) access to do this. Requires replacement if changed.
    clusterName String
    The SKU representing the branch's cluster size
    clusterSize String
    The database cluster size. Required if a backupid is provided, optional otherwise. Options: PS10, PS20, PS40, ..., PS_2800. Requires replacement if changed.
    database String
    The name of the database the branch belongs to
    htmlUrl String
    Planetscale app URL for the branch
    majorVersion String
    For PostgreSQL databases, the PostgreSQL major version to use for the branch. Defaults to the major version of the parent branch if it exists or the database's default branch major version. Ignored for branches restored from backups. Requires replacement if changed.
    name String
    The name of the branch to create
    organization String
    The name of the organization the branch belongs to
    parentBranch String
    The name of the parent branch. Defaults to the database's default branch if not provided. Requires replacement if changed.
    ready Boolean
    Whether or not the branch is ready to serve queries
    region String
    The region to create the branch in. If not provided, the branch will be created in the default region for its database. Requires replacement if changed.
    regionData PostgresBranchRegionData
    replicas Double
    The number of replicas for the branch
    restorePoint String
    Restore from a point-in-time recovery timestamp (e.g. 2023-01-01T00:00:00Z). Available only for PostgreSQL databases. Requires replacement if changed.
    state String
    The current state of the branch
    url String
    Planetscale API URL for the branch
    actor PostgresBranchActor
    backupId string
    If provided, restores the backup's schema and data to the new branch. Must have restore_production_branch_backup(s) or restore_backup(s) access to do this. Requires replacement if changed.
    clusterName string
    The SKU representing the branch's cluster size
    clusterSize string
    The database cluster size. Required if a backupid is provided, optional otherwise. Options: PS10, PS20, PS40, ..., PS_2800. Requires replacement if changed.
    database string
    The name of the database the branch belongs to
    htmlUrl string
    Planetscale app URL for the branch
    majorVersion string
    For PostgreSQL databases, the PostgreSQL major version to use for the branch. Defaults to the major version of the parent branch if it exists or the database's default branch major version. Ignored for branches restored from backups. Requires replacement if changed.
    name string
    The name of the branch to create
    organization string
    The name of the organization the branch belongs to
    parentBranch string
    The name of the parent branch. Defaults to the database's default branch if not provided. Requires replacement if changed.
    ready boolean
    Whether or not the branch is ready to serve queries
    region string
    The region to create the branch in. If not provided, the branch will be created in the default region for its database. Requires replacement if changed.
    regionData PostgresBranchRegionData
    replicas number
    The number of replicas for the branch
    restorePoint string
    Restore from a point-in-time recovery timestamp (e.g. 2023-01-01T00:00:00Z). Available only for PostgreSQL databases. Requires replacement if changed.
    state string
    The current state of the branch
    url string
    Planetscale API URL for the branch
    actor PostgresBranchActorArgs
    backup_id str
    If provided, restores the backup's schema and data to the new branch. Must have restore_production_branch_backup(s) or restore_backup(s) access to do this. Requires replacement if changed.
    cluster_name str
    The SKU representing the branch's cluster size
    cluster_size str
    The database cluster size. Required if a backupid is provided, optional otherwise. Options: PS10, PS20, PS40, ..., PS_2800. Requires replacement if changed.
    database str
    The name of the database the branch belongs to
    html_url str
    Planetscale app URL for the branch
    major_version str
    For PostgreSQL databases, the PostgreSQL major version to use for the branch. Defaults to the major version of the parent branch if it exists or the database's default branch major version. Ignored for branches restored from backups. Requires replacement if changed.
    name str
    The name of the branch to create
    organization str
    The name of the organization the branch belongs to
    parent_branch str
    The name of the parent branch. Defaults to the database's default branch if not provided. Requires replacement if changed.
    ready bool
    Whether or not the branch is ready to serve queries
    region str
    The region to create the branch in. If not provided, the branch will be created in the default region for its database. Requires replacement if changed.
    region_data PostgresBranchRegionDataArgs
    replicas float
    The number of replicas for the branch
    restore_point str
    Restore from a point-in-time recovery timestamp (e.g. 2023-01-01T00:00:00Z). Available only for PostgreSQL databases. Requires replacement if changed.
    state str
    The current state of the branch
    url str
    Planetscale API URL for the branch
    actor Property Map
    backupId String
    If provided, restores the backup's schema and data to the new branch. Must have restore_production_branch_backup(s) or restore_backup(s) access to do this. Requires replacement if changed.
    clusterName String
    The SKU representing the branch's cluster size
    clusterSize String
    The database cluster size. Required if a backupid is provided, optional otherwise. Options: PS10, PS20, PS40, ..., PS_2800. Requires replacement if changed.
    database String
    The name of the database the branch belongs to
    htmlUrl String
    Planetscale app URL for the branch
    majorVersion String
    For PostgreSQL databases, the PostgreSQL major version to use for the branch. Defaults to the major version of the parent branch if it exists or the database's default branch major version. Ignored for branches restored from backups. Requires replacement if changed.
    name String
    The name of the branch to create
    organization String
    The name of the organization the branch belongs to
    parentBranch String
    The name of the parent branch. Defaults to the database's default branch if not provided. Requires replacement if changed.
    ready Boolean
    Whether or not the branch is ready to serve queries
    region String
    The region to create the branch in. If not provided, the branch will be created in the default region for its database. Requires replacement if changed.
    regionData Property Map
    replicas Number
    The number of replicas for the branch
    restorePoint String
    Restore from a point-in-time recovery timestamp (e.g. 2023-01-01T00:00:00Z). Available only for PostgreSQL databases. Requires replacement if changed.
    state String
    The current state of the branch
    url String
    Planetscale API URL for the branch

    Supporting Types

    PostgresBranchActor, PostgresBranchActorArgs

    Id string
    The ID of the actor
    Id string
    The ID of the actor
    id String
    The ID of the actor
    id string
    The ID of the actor
    id str
    The ID of the actor
    id String
    The ID of the actor

    PostgresBranchRegionData, PostgresBranchRegionDataArgs

    Id string
    The ID of the region
    Id string
    The ID of the region
    id String
    The ID of the region
    id string
    The ID of the region
    id str
    The ID of the region
    id String
    The ID of the region

    Import

    In Terraform v1.5.0 and later, the import block can be used with the id attribute, for example:

    terraform

    import {

    to = planetscale_postgres_branch.my_planetscale_postgres_branch

    id = jsonencode({

    database = "..."
    
    id = "..."
    
    organization = "..."
    

    })

    }

    The pulumi import command can be used, for example:

    $ pulumi import planetscale:index/postgresBranch:PostgresBranch my_planetscale_postgres_branch '{"database": "...", "id": "...", "organization": "..."}'
    

    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.
    planetscale logo
    planetscale 1.0.0-rc1 published on Friday, Jan 30, 2026 by planetscale
      Meet Neo: Your AI Platform Teammate