1. Packages
  2. Packages
  3. Planetscale Provider
  4. API Docs
  5. VitessBranch
Viewing docs for planetscale 1.8.0
published on Thursday, Aug 13, 2026 by planetscale
Viewing docs for planetscale 1.8.0
published on Thursday, Aug 13, 2026 by planetscale

    VitessBranch Resource

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as planetscale from "@pulumi/planetscale";
    
    const myVitessbranch = new planetscale.VitessBranch("my_vitessbranch", {
        organization: "my-organization",
        database: "ru00w3vqvfr9",
        name: "my-branch",
        deletionProtected: true,
        safeMigrations: true,
        vtgateAutoscaling: true,
        vtgateCount: 1,
        vtgateMaxCount: 2,
        vtgateSize: "VTG_320",
        vtgateTargetCpuUtilization: 50,
    });
    
    import pulumi
    import pulumi_planetscale as planetscale
    
    my_vitessbranch = planetscale.VitessBranch("my_vitessbranch",
        organization="my-organization",
        database="ru00w3vqvfr9",
        name="my-branch",
        deletion_protected=True,
        safe_migrations=True,
        vtgate_autoscaling=True,
        vtgate_count=1,
        vtgate_max_count=2,
        vtgate_size="VTG_320",
        vtgate_target_cpu_utilization=50)
    
    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.NewVitessBranch(ctx, "my_vitessbranch", &planetscale.VitessBranchArgs{
    			Organization:               pulumi.String("my-organization"),
    			Database:                   pulumi.String("ru00w3vqvfr9"),
    			Name:                       pulumi.String("my-branch"),
    			DeletionProtected:          pulumi.Bool(true),
    			SafeMigrations:             pulumi.Bool(true),
    			VtgateAutoscaling:          pulumi.Bool(true),
    			VtgateCount:                pulumi.Float64(1),
    			VtgateMaxCount:             pulumi.Float64(2),
    			VtgateSize:                 pulumi.String("VTG_320"),
    			VtgateTargetCpuUtilization: pulumi.Float64(50),
    		})
    		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 myVitessbranch = new Planetscale.VitessBranch("my_vitessbranch", new()
        {
            Organization = "my-organization",
            Database = "ru00w3vqvfr9",
            Name = "my-branch",
            DeletionProtected = true,
            SafeMigrations = true,
            VtgateAutoscaling = true,
            VtgateCount = 1,
            VtgateMaxCount = 2,
            VtgateSize = "VTG_320",
            VtgateTargetCpuUtilization = 50,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.planetscale.VitessBranch;
    import com.pulumi.planetscale.VitessBranchArgs;
    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 myVitessbranch = new VitessBranch("myVitessbranch", VitessBranchArgs.builder()
                .organization("my-organization")
                .database("ru00w3vqvfr9")
                .name("my-branch")
                .deletionProtected(true)
                .safeMigrations(true)
                .vtgateAutoscaling(true)
                .vtgateCount(1.0)
                .vtgateMaxCount(2.0)
                .vtgateSize("VTG_320")
                .vtgateTargetCpuUtilization(50.0)
                .build());
    
        }
    }
    
    resources:
      myVitessbranch:
        type: planetscale:VitessBranch
        name: my_vitessbranch
        properties:
          organization: my-organization
          database: ru00w3vqvfr9
          name: my-branch
          deletionProtected: true
          safeMigrations: true
          vtgateAutoscaling: true
          vtgateCount: 1
          vtgateMaxCount: 2
          vtgateSize: VTG_320
          vtgateTargetCpuUtilization: 50
    
    Example coming soon!
    

    Create VitessBranch Resource

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

    Constructor syntax

    new VitessBranch(name: string, args: VitessBranchArgs, opts?: CustomResourceOptions);
    @overload
    def VitessBranch(resource_name: str,
                     args: VitessBranchArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def VitessBranch(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     database: Optional[str] = None,
                     organization: Optional[str] = None,
                     region: Optional[str] = None,
                     safe_migrations: Optional[bool] = None,
                     deletion_protected: Optional[bool] = None,
                     name: Optional[str] = None,
                     cluster_size: Optional[str] = None,
                     parent_branch: Optional[str] = None,
                     backup_id: Optional[str] = None,
                     delete_descendants: Optional[bool] = None,
                     seed_data: Optional[str] = None,
                     vtgate_autoscaling: Optional[bool] = None,
                     vtgate_count: Optional[float] = None,
                     vtgate_max_count: Optional[float] = None,
                     vtgate_size: Optional[str] = None,
                     vtgate_target_cpu_utilization: Optional[float] = None)
    func NewVitessBranch(ctx *Context, name string, args VitessBranchArgs, opts ...ResourceOption) (*VitessBranch, error)
    public VitessBranch(string name, VitessBranchArgs args, CustomResourceOptions? opts = null)
    public VitessBranch(String name, VitessBranchArgs args)
    public VitessBranch(String name, VitessBranchArgs args, CustomResourceOptions options)
    
    type: planetscale:VitessBranch
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "planetscale_vitess_branch" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args VitessBranchArgs
    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 VitessBranchArgs
    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 VitessBranchArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VitessBranchArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VitessBranchArgs
    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 vitessBranchResource = new Planetscale.VitessBranch("vitessBranchResource", new()
    {
        Database = "string",
        Organization = "string",
        Region = "string",
        SafeMigrations = false,
        DeletionProtected = false,
        Name = "string",
        ClusterSize = "string",
        ParentBranch = "string",
        BackupId = "string",
        DeleteDescendants = false,
        SeedData = "string",
        VtgateAutoscaling = false,
        VtgateCount = 0,
        VtgateMaxCount = 0,
        VtgateSize = "string",
        VtgateTargetCpuUtilization = 0,
    });
    
    example, err := planetscale.NewVitessBranch(ctx, "vitessBranchResource", &planetscale.VitessBranchArgs{
    	Database:                   pulumi.String("string"),
    	Organization:               pulumi.String("string"),
    	Region:                     pulumi.String("string"),
    	SafeMigrations:             pulumi.Bool(false),
    	DeletionProtected:          pulumi.Bool(false),
    	Name:                       pulumi.String("string"),
    	ClusterSize:                pulumi.String("string"),
    	ParentBranch:               pulumi.String("string"),
    	BackupId:                   pulumi.String("string"),
    	DeleteDescendants:          pulumi.Bool(false),
    	SeedData:                   pulumi.String("string"),
    	VtgateAutoscaling:          pulumi.Bool(false),
    	VtgateCount:                pulumi.Float64(0),
    	VtgateMaxCount:             pulumi.Float64(0),
    	VtgateSize:                 pulumi.String("string"),
    	VtgateTargetCpuUtilization: pulumi.Float64(0),
    })
    
    resource "planetscale_vitess_branch" "vitessBranchResource" {
      lifecycle {
        create_before_destroy = true
      }
      database                      = "string"
      organization                  = "string"
      region                        = "string"
      safe_migrations               = false
      deletion_protected            = false
      name                          = "string"
      cluster_size                  = "string"
      parent_branch                 = "string"
      backup_id                     = "string"
      delete_descendants            = false
      seed_data                     = "string"
      vtgate_autoscaling            = false
      vtgate_count                  = 0
      vtgate_max_count              = 0
      vtgate_size                   = "string"
      vtgate_target_cpu_utilization = 0
    }
    
    var vitessBranchResource = new VitessBranch("vitessBranchResource", VitessBranchArgs.builder()
        .database("string")
        .organization("string")
        .region("string")
        .safeMigrations(false)
        .deletionProtected(false)
        .name("string")
        .clusterSize("string")
        .parentBranch("string")
        .backupId("string")
        .deleteDescendants(false)
        .seedData("string")
        .vtgateAutoscaling(false)
        .vtgateCount(0.0)
        .vtgateMaxCount(0.0)
        .vtgateSize("string")
        .vtgateTargetCpuUtilization(0.0)
        .build());
    
    vitess_branch_resource = planetscale.VitessBranch("vitessBranchResource",
        database="string",
        organization="string",
        region="string",
        safe_migrations=False,
        deletion_protected=False,
        name="string",
        cluster_size="string",
        parent_branch="string",
        backup_id="string",
        delete_descendants=False,
        seed_data="string",
        vtgate_autoscaling=False,
        vtgate_count=float(0),
        vtgate_max_count=float(0),
        vtgate_size="string",
        vtgate_target_cpu_utilization=float(0))
    
    const vitessBranchResource = new planetscale.VitessBranch("vitessBranchResource", {
        database: "string",
        organization: "string",
        region: "string",
        safeMigrations: false,
        deletionProtected: false,
        name: "string",
        clusterSize: "string",
        parentBranch: "string",
        backupId: "string",
        deleteDescendants: false,
        seedData: "string",
        vtgateAutoscaling: false,
        vtgateCount: 0,
        vtgateMaxCount: 0,
        vtgateSize: "string",
        vtgateTargetCpuUtilization: 0,
    });
    
    type: planetscale:VitessBranch
    properties:
        backupId: string
        clusterSize: string
        database: string
        deleteDescendants: false
        deletionProtected: false
        name: string
        organization: string
        parentBranch: string
        region: string
        safeMigrations: false
        seedData: string
        vtgateAutoscaling: false
        vtgateCount: 0
        vtgateMaxCount: 0
        vtgateSize: string
        vtgateTargetCpuUtilization: 0
    

    VitessBranch 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 VitessBranch 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 (unless keyspaceclustersizes covers every keyspace), optional otherwise. Options: PS10, PS20, PS40, ..., PS_2800. Requires replacement if changed.
    DeleteDescendants bool
    If true, recursively delete all descendant branches along with this branch
    DeletionProtected bool
    Whether deletion protection is enabled for the branch
    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.
    SafeMigrations bool
    Whether safe migrations are enabled
    SeedData string
    If provided, restores the last successful backup's schema and data to the new branch. Must have restore_production_branch_backup(s) or restore_backup(s) access to do this, in addition to Data Branching™ being enabled for the branch. must be "lastsuccessfulbackup"; Requires replacement if changed.
    VtgateAutoscaling bool
    If autoscaling is enabled for the vtgate cluster
    VtgateCount double
    The number of vtgates in an availability zone
    VtgateMaxCount double
    The maximum number of vtgates in an availability zone when autoscaling is enabled
    VtgateSize string
    The size of the vtgate cluster: VTG5, VTG10,…
    VtgateTargetCpuUtilization double
    The target CPU utilization for the vtgate cluster when autoscaling is enabled
    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 (unless keyspaceclustersizes covers every keyspace), optional otherwise. Options: PS10, PS20, PS40, ..., PS_2800. Requires replacement if changed.
    DeleteDescendants bool
    If true, recursively delete all descendant branches along with this branch
    DeletionProtected bool
    Whether deletion protection is enabled for the branch
    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.
    SafeMigrations bool
    Whether safe migrations are enabled
    SeedData string
    If provided, restores the last successful backup's schema and data to the new branch. Must have restore_production_branch_backup(s) or restore_backup(s) access to do this, in addition to Data Branching™ being enabled for the branch. must be "lastsuccessfulbackup"; Requires replacement if changed.
    VtgateAutoscaling bool
    If autoscaling is enabled for the vtgate cluster
    VtgateCount float64
    The number of vtgates in an availability zone
    VtgateMaxCount float64
    The maximum number of vtgates in an availability zone when autoscaling is enabled
    VtgateSize string
    The size of the vtgate cluster: VTG5, VTG10,…
    VtgateTargetCpuUtilization float64
    The target CPU utilization for the vtgate cluster when autoscaling is enabled
    database string
    The name of the database the branch belongs to
    organization string
    The name of the organization the branch belongs to
    backup_id 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.
    cluster_size string
    The database cluster size. Required if a backupid is provided (unless keyspaceclustersizes covers every keyspace), optional otherwise. Options: PS10, PS20, PS40, ..., PS_2800. Requires replacement if changed.
    delete_descendants bool
    If true, recursively delete all descendant branches along with this branch
    deletion_protected bool
    Whether deletion protection is enabled for the branch
    name string
    The name of the branch to create
    parent_branch 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.
    safe_migrations bool
    Whether safe migrations are enabled
    seed_data string
    If provided, restores the last successful backup's schema and data to the new branch. Must have restore_production_branch_backup(s) or restore_backup(s) access to do this, in addition to Data Branching™ being enabled for the branch. must be "lastsuccessfulbackup"; Requires replacement if changed.
    vtgate_autoscaling bool
    If autoscaling is enabled for the vtgate cluster
    vtgate_count number
    The number of vtgates in an availability zone
    vtgate_max_count number
    The maximum number of vtgates in an availability zone when autoscaling is enabled
    vtgate_size string
    The size of the vtgate cluster: VTG5, VTG10,…
    vtgate_target_cpu_utilization number
    The target CPU utilization for the vtgate cluster when autoscaling is enabled
    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 (unless keyspaceclustersizes covers every keyspace), optional otherwise. Options: PS10, PS20, PS40, ..., PS_2800. Requires replacement if changed.
    deleteDescendants Boolean
    If true, recursively delete all descendant branches along with this branch
    deletionProtected Boolean
    Whether deletion protection is enabled for the branch
    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.
    safeMigrations Boolean
    Whether safe migrations are enabled
    seedData String
    If provided, restores the last successful backup's schema and data to the new branch. Must have restore_production_branch_backup(s) or restore_backup(s) access to do this, in addition to Data Branching™ being enabled for the branch. must be "lastsuccessfulbackup"; Requires replacement if changed.
    vtgateAutoscaling Boolean
    If autoscaling is enabled for the vtgate cluster
    vtgateCount Double
    The number of vtgates in an availability zone
    vtgateMaxCount Double
    The maximum number of vtgates in an availability zone when autoscaling is enabled
    vtgateSize String
    The size of the vtgate cluster: VTG5, VTG10,…
    vtgateTargetCpuUtilization Double
    The target CPU utilization for the vtgate cluster when autoscaling is enabled
    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 (unless keyspaceclustersizes covers every keyspace), optional otherwise. Options: PS10, PS20, PS40, ..., PS_2800. Requires replacement if changed.
    deleteDescendants boolean
    If true, recursively delete all descendant branches along with this branch
    deletionProtected boolean
    Whether deletion protection is enabled for the branch
    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.
    safeMigrations boolean
    Whether safe migrations are enabled
    seedData string
    If provided, restores the last successful backup's schema and data to the new branch. Must have restore_production_branch_backup(s) or restore_backup(s) access to do this, in addition to Data Branching™ being enabled for the branch. must be "lastsuccessfulbackup"; Requires replacement if changed.
    vtgateAutoscaling boolean
    If autoscaling is enabled for the vtgate cluster
    vtgateCount number
    The number of vtgates in an availability zone
    vtgateMaxCount number
    The maximum number of vtgates in an availability zone when autoscaling is enabled
    vtgateSize string
    The size of the vtgate cluster: VTG5, VTG10,…
    vtgateTargetCpuUtilization number
    The target CPU utilization for the vtgate cluster when autoscaling is enabled
    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 (unless keyspaceclustersizes covers every keyspace), optional otherwise. Options: PS10, PS20, PS40, ..., PS_2800. Requires replacement if changed.
    delete_descendants bool
    If true, recursively delete all descendant branches along with this branch
    deletion_protected bool
    Whether deletion protection is enabled for the branch
    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.
    safe_migrations bool
    Whether safe migrations are enabled
    seed_data str
    If provided, restores the last successful backup's schema and data to the new branch. Must have restore_production_branch_backup(s) or restore_backup(s) access to do this, in addition to Data Branching™ being enabled for the branch. must be "lastsuccessfulbackup"; Requires replacement if changed.
    vtgate_autoscaling bool
    If autoscaling is enabled for the vtgate cluster
    vtgate_count float
    The number of vtgates in an availability zone
    vtgate_max_count float
    The maximum number of vtgates in an availability zone when autoscaling is enabled
    vtgate_size str
    The size of the vtgate cluster: VTG5, VTG10,…
    vtgate_target_cpu_utilization float
    The target CPU utilization for the vtgate cluster when autoscaling is enabled
    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 (unless keyspaceclustersizes covers every keyspace), optional otherwise. Options: PS10, PS20, PS40, ..., PS_2800. Requires replacement if changed.
    deleteDescendants Boolean
    If true, recursively delete all descendant branches along with this branch
    deletionProtected Boolean
    Whether deletion protection is enabled for the branch
    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.
    safeMigrations Boolean
    Whether safe migrations are enabled
    seedData String
    If provided, restores the last successful backup's schema and data to the new branch. Must have restore_production_branch_backup(s) or restore_backup(s) access to do this, in addition to Data Branching™ being enabled for the branch. must be "lastsuccessfulbackup"; Requires replacement if changed.
    vtgateAutoscaling Boolean
    If autoscaling is enabled for the vtgate cluster
    vtgateCount Number
    The number of vtgates in an availability zone
    vtgateMaxCount Number
    The maximum number of vtgates in an availability zone when autoscaling is enabled
    vtgateSize String
    The size of the vtgate cluster: VTG5, VTG10,…
    vtgateTargetCpuUtilization Number
    The target CPU utilization for the vtgate cluster when autoscaling is enabled

    Outputs

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

    Actor VitessBranchActor
    HtmlUrl string
    Planetscale app URL for the branch
    Id string
    The provider-assigned unique ID for this managed resource.
    KeyspaceCount double
    The number of keyspaces in the branch
    MysqlAddress string
    The MySQL address for the branch
    MysqlEdgeAddress string
    The address of the MySQL provider for the branch
    Ready bool
    Whether or not the branch is ready to serve queries
    RegionData VitessBranchRegionData
    State string
    The current state of the branch
    Url string
    Planetscale API URL for the branch
    Actor VitessBranchActor
    HtmlUrl string
    Planetscale app URL for the branch
    Id string
    The provider-assigned unique ID for this managed resource.
    KeyspaceCount float64
    The number of keyspaces in the branch
    MysqlAddress string
    The MySQL address for the branch
    MysqlEdgeAddress string
    The address of the MySQL provider for the branch
    Ready bool
    Whether or not the branch is ready to serve queries
    RegionData VitessBranchRegionData
    State string
    The current state of the branch
    Url string
    Planetscale API URL for the branch
    actor object
    html_url string
    Planetscale app URL for the branch
    id string
    The provider-assigned unique ID for this managed resource.
    keyspace_count number
    The number of keyspaces in the branch
    mysql_address string
    The MySQL address for the branch
    mysql_edge_address string
    The address of the MySQL provider for the branch
    ready bool
    Whether or not the branch is ready to serve queries
    region_data object
    state string
    The current state of the branch
    url string
    Planetscale API URL for the branch
    actor VitessBranchActor
    htmlUrl String
    Planetscale app URL for the branch
    id String
    The provider-assigned unique ID for this managed resource.
    keyspaceCount Double
    The number of keyspaces in the branch
    mysqlAddress String
    The MySQL address for the branch
    mysqlEdgeAddress String
    The address of the MySQL provider for the branch
    ready Boolean
    Whether or not the branch is ready to serve queries
    regionData VitessBranchRegionData
    state String
    The current state of the branch
    url String
    Planetscale API URL for the branch
    actor VitessBranchActor
    htmlUrl string
    Planetscale app URL for the branch
    id string
    The provider-assigned unique ID for this managed resource.
    keyspaceCount number
    The number of keyspaces in the branch
    mysqlAddress string
    The MySQL address for the branch
    mysqlEdgeAddress string
    The address of the MySQL provider for the branch
    ready boolean
    Whether or not the branch is ready to serve queries
    regionData VitessBranchRegionData
    state string
    The current state of the branch
    url string
    Planetscale API URL for the branch
    actor VitessBranchActor
    html_url str
    Planetscale app URL for the branch
    id str
    The provider-assigned unique ID for this managed resource.
    keyspace_count float
    The number of keyspaces in the branch
    mysql_address str
    The MySQL address for the branch
    mysql_edge_address str
    The address of the MySQL provider for the branch
    ready bool
    Whether or not the branch is ready to serve queries
    region_data VitessBranchRegionData
    state str
    The current state of the branch
    url str
    Planetscale API URL for the branch
    actor Property Map
    htmlUrl String
    Planetscale app URL for the branch
    id String
    The provider-assigned unique ID for this managed resource.
    keyspaceCount Number
    The number of keyspaces in the branch
    mysqlAddress String
    The MySQL address for the branch
    mysqlEdgeAddress String
    The address of the MySQL provider for the branch
    ready Boolean
    Whether or not the branch is ready to serve queries
    regionData Property Map
    state String
    The current state of the branch
    url String
    Planetscale API URL for the branch

    Look up Existing VitessBranch Resource

    Get an existing VitessBranch 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?: VitessBranchState, opts?: CustomResourceOptions): VitessBranch
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            actor: Optional[VitessBranchActorArgs] = None,
            backup_id: Optional[str] = None,
            cluster_size: Optional[str] = None,
            database: Optional[str] = None,
            delete_descendants: Optional[bool] = None,
            deletion_protected: Optional[bool] = None,
            html_url: Optional[str] = None,
            keyspace_count: Optional[float] = None,
            mysql_address: Optional[str] = None,
            mysql_edge_address: 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[VitessBranchRegionDataArgs] = None,
            safe_migrations: Optional[bool] = None,
            seed_data: Optional[str] = None,
            state: Optional[str] = None,
            url: Optional[str] = None,
            vtgate_autoscaling: Optional[bool] = None,
            vtgate_count: Optional[float] = None,
            vtgate_max_count: Optional[float] = None,
            vtgate_size: Optional[str] = None,
            vtgate_target_cpu_utilization: Optional[float] = None) -> VitessBranch
    func GetVitessBranch(ctx *Context, name string, id IDInput, state *VitessBranchState, opts ...ResourceOption) (*VitessBranch, error)
    public static VitessBranch Get(string name, Input<string> id, VitessBranchState? state, CustomResourceOptions? opts = null)
    public static VitessBranch get(String name, Output<String> id, VitessBranchState state, CustomResourceOptions options)
    resources:  _:    type: planetscale:VitessBranch    get:      id: ${id}
    import {
      to = planetscale_vitess_branch.example
      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 VitessBranchActor
    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 (unless keyspaceclustersizes covers every keyspace), optional otherwise. Options: PS10, PS20, PS40, ..., PS_2800. Requires replacement if changed.
    Database string
    The name of the database the branch belongs to
    DeleteDescendants bool
    If true, recursively delete all descendant branches along with this branch
    DeletionProtected bool
    Whether deletion protection is enabled for the branch
    HtmlUrl string
    Planetscale app URL for the branch
    KeyspaceCount double
    The number of keyspaces in the branch
    MysqlAddress string
    The MySQL address for the branch
    MysqlEdgeAddress string
    The address of the MySQL provider for the branch
    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 VitessBranchRegionData
    SafeMigrations bool
    Whether safe migrations are enabled
    SeedData string
    If provided, restores the last successful backup's schema and data to the new branch. Must have restore_production_branch_backup(s) or restore_backup(s) access to do this, in addition to Data Branching™ being enabled for the branch. must be "lastsuccessfulbackup"; Requires replacement if changed.
    State string
    The current state of the branch
    Url string
    Planetscale API URL for the branch
    VtgateAutoscaling bool
    If autoscaling is enabled for the vtgate cluster
    VtgateCount double
    The number of vtgates in an availability zone
    VtgateMaxCount double
    The maximum number of vtgates in an availability zone when autoscaling is enabled
    VtgateSize string
    The size of the vtgate cluster: VTG5, VTG10,…
    VtgateTargetCpuUtilization double
    The target CPU utilization for the vtgate cluster when autoscaling is enabled
    Actor VitessBranchActorArgs
    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 (unless keyspaceclustersizes covers every keyspace), optional otherwise. Options: PS10, PS20, PS40, ..., PS_2800. Requires replacement if changed.
    Database string
    The name of the database the branch belongs to
    DeleteDescendants bool
    If true, recursively delete all descendant branches along with this branch
    DeletionProtected bool
    Whether deletion protection is enabled for the branch
    HtmlUrl string
    Planetscale app URL for the branch
    KeyspaceCount float64
    The number of keyspaces in the branch
    MysqlAddress string
    The MySQL address for the branch
    MysqlEdgeAddress string
    The address of the MySQL provider for the branch
    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 VitessBranchRegionDataArgs
    SafeMigrations bool
    Whether safe migrations are enabled
    SeedData string
    If provided, restores the last successful backup's schema and data to the new branch. Must have restore_production_branch_backup(s) or restore_backup(s) access to do this, in addition to Data Branching™ being enabled for the branch. must be "lastsuccessfulbackup"; Requires replacement if changed.
    State string
    The current state of the branch
    Url string
    Planetscale API URL for the branch
    VtgateAutoscaling bool
    If autoscaling is enabled for the vtgate cluster
    VtgateCount float64
    The number of vtgates in an availability zone
    VtgateMaxCount float64
    The maximum number of vtgates in an availability zone when autoscaling is enabled
    VtgateSize string
    The size of the vtgate cluster: VTG5, VTG10,…
    VtgateTargetCpuUtilization float64
    The target CPU utilization for the vtgate cluster when autoscaling is enabled
    actor object
    backup_id 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.
    cluster_size string
    The database cluster size. Required if a backupid is provided (unless keyspaceclustersizes covers every keyspace), optional otherwise. Options: PS10, PS20, PS40, ..., PS_2800. Requires replacement if changed.
    database string
    The name of the database the branch belongs to
    delete_descendants bool
    If true, recursively delete all descendant branches along with this branch
    deletion_protected bool
    Whether deletion protection is enabled for the branch
    html_url string
    Planetscale app URL for the branch
    keyspace_count number
    The number of keyspaces in the branch
    mysql_address string
    The MySQL address for the branch
    mysql_edge_address string
    The address of the MySQL provider for the branch
    name string
    The name of the branch to create
    organization string
    The name of the organization the branch belongs to
    parent_branch 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.
    region_data object
    safe_migrations bool
    Whether safe migrations are enabled
    seed_data string
    If provided, restores the last successful backup's schema and data to the new branch. Must have restore_production_branch_backup(s) or restore_backup(s) access to do this, in addition to Data Branching™ being enabled for the branch. must be "lastsuccessfulbackup"; Requires replacement if changed.
    state string
    The current state of the branch
    url string
    Planetscale API URL for the branch
    vtgate_autoscaling bool
    If autoscaling is enabled for the vtgate cluster
    vtgate_count number
    The number of vtgates in an availability zone
    vtgate_max_count number
    The maximum number of vtgates in an availability zone when autoscaling is enabled
    vtgate_size string
    The size of the vtgate cluster: VTG5, VTG10,…
    vtgate_target_cpu_utilization number
    The target CPU utilization for the vtgate cluster when autoscaling is enabled
    actor VitessBranchActor
    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 (unless keyspaceclustersizes covers every keyspace), optional otherwise. Options: PS10, PS20, PS40, ..., PS_2800. Requires replacement if changed.
    database String
    The name of the database the branch belongs to
    deleteDescendants Boolean
    If true, recursively delete all descendant branches along with this branch
    deletionProtected Boolean
    Whether deletion protection is enabled for the branch
    htmlUrl String
    Planetscale app URL for the branch
    keyspaceCount Double
    The number of keyspaces in the branch
    mysqlAddress String
    The MySQL address for the branch
    mysqlEdgeAddress String
    The address of the MySQL provider for the branch
    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 VitessBranchRegionData
    safeMigrations Boolean
    Whether safe migrations are enabled
    seedData String
    If provided, restores the last successful backup's schema and data to the new branch. Must have restore_production_branch_backup(s) or restore_backup(s) access to do this, in addition to Data Branching™ being enabled for the branch. must be "lastsuccessfulbackup"; Requires replacement if changed.
    state String
    The current state of the branch
    url String
    Planetscale API URL for the branch
    vtgateAutoscaling Boolean
    If autoscaling is enabled for the vtgate cluster
    vtgateCount Double
    The number of vtgates in an availability zone
    vtgateMaxCount Double
    The maximum number of vtgates in an availability zone when autoscaling is enabled
    vtgateSize String
    The size of the vtgate cluster: VTG5, VTG10,…
    vtgateTargetCpuUtilization Double
    The target CPU utilization for the vtgate cluster when autoscaling is enabled
    actor VitessBranchActor
    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 (unless keyspaceclustersizes covers every keyspace), optional otherwise. Options: PS10, PS20, PS40, ..., PS_2800. Requires replacement if changed.
    database string
    The name of the database the branch belongs to
    deleteDescendants boolean
    If true, recursively delete all descendant branches along with this branch
    deletionProtected boolean
    Whether deletion protection is enabled for the branch
    htmlUrl string
    Planetscale app URL for the branch
    keyspaceCount number
    The number of keyspaces in the branch
    mysqlAddress string
    The MySQL address for the branch
    mysqlEdgeAddress string
    The address of the MySQL provider for the branch
    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 VitessBranchRegionData
    safeMigrations boolean
    Whether safe migrations are enabled
    seedData string
    If provided, restores the last successful backup's schema and data to the new branch. Must have restore_production_branch_backup(s) or restore_backup(s) access to do this, in addition to Data Branching™ being enabled for the branch. must be "lastsuccessfulbackup"; Requires replacement if changed.
    state string
    The current state of the branch
    url string
    Planetscale API URL for the branch
    vtgateAutoscaling boolean
    If autoscaling is enabled for the vtgate cluster
    vtgateCount number
    The number of vtgates in an availability zone
    vtgateMaxCount number
    The maximum number of vtgates in an availability zone when autoscaling is enabled
    vtgateSize string
    The size of the vtgate cluster: VTG5, VTG10,…
    vtgateTargetCpuUtilization number
    The target CPU utilization for the vtgate cluster when autoscaling is enabled
    actor VitessBranchActorArgs
    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 (unless keyspaceclustersizes covers every keyspace), optional otherwise. Options: PS10, PS20, PS40, ..., PS_2800. Requires replacement if changed.
    database str
    The name of the database the branch belongs to
    delete_descendants bool
    If true, recursively delete all descendant branches along with this branch
    deletion_protected bool
    Whether deletion protection is enabled for the branch
    html_url str
    Planetscale app URL for the branch
    keyspace_count float
    The number of keyspaces in the branch
    mysql_address str
    The MySQL address for the branch
    mysql_edge_address str
    The address of the MySQL provider for the branch
    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 VitessBranchRegionDataArgs
    safe_migrations bool
    Whether safe migrations are enabled
    seed_data str
    If provided, restores the last successful backup's schema and data to the new branch. Must have restore_production_branch_backup(s) or restore_backup(s) access to do this, in addition to Data Branching™ being enabled for the branch. must be "lastsuccessfulbackup"; Requires replacement if changed.
    state str
    The current state of the branch
    url str
    Planetscale API URL for the branch
    vtgate_autoscaling bool
    If autoscaling is enabled for the vtgate cluster
    vtgate_count float
    The number of vtgates in an availability zone
    vtgate_max_count float
    The maximum number of vtgates in an availability zone when autoscaling is enabled
    vtgate_size str
    The size of the vtgate cluster: VTG5, VTG10,…
    vtgate_target_cpu_utilization float
    The target CPU utilization for the vtgate cluster when autoscaling is enabled
    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.
    clusterSize String
    The database cluster size. Required if a backupid is provided (unless keyspaceclustersizes covers every keyspace), optional otherwise. Options: PS10, PS20, PS40, ..., PS_2800. Requires replacement if changed.
    database String
    The name of the database the branch belongs to
    deleteDescendants Boolean
    If true, recursively delete all descendant branches along with this branch
    deletionProtected Boolean
    Whether deletion protection is enabled for the branch
    htmlUrl String
    Planetscale app URL for the branch
    keyspaceCount Number
    The number of keyspaces in the branch
    mysqlAddress String
    The MySQL address for the branch
    mysqlEdgeAddress String
    The address of the MySQL provider for the branch
    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
    safeMigrations Boolean
    Whether safe migrations are enabled
    seedData String
    If provided, restores the last successful backup's schema and data to the new branch. Must have restore_production_branch_backup(s) or restore_backup(s) access to do this, in addition to Data Branching™ being enabled for the branch. must be "lastsuccessfulbackup"; Requires replacement if changed.
    state String
    The current state of the branch
    url String
    Planetscale API URL for the branch
    vtgateAutoscaling Boolean
    If autoscaling is enabled for the vtgate cluster
    vtgateCount Number
    The number of vtgates in an availability zone
    vtgateMaxCount Number
    The maximum number of vtgates in an availability zone when autoscaling is enabled
    vtgateSize String
    The size of the vtgate cluster: VTG5, VTG10,…
    vtgateTargetCpuUtilization Number
    The target CPU utilization for the vtgate cluster when autoscaling is enabled

    Supporting Types

    VitessBranchActor, VitessBranchActorArgs

    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 string
    The ID of the actor
    id str
    The ID of the actor
    id String
    The ID of the actor

    VitessBranchRegionData, VitessBranchRegionDataArgs

    Id string
    The ID of the region
    MysqlSupported bool
    Whether the region supports MySQL/Vitess databases
    PostgresqlSupported bool
    Whether the region supports PostgreSQL databases
    Id string
    The ID of the region
    MysqlSupported bool
    Whether the region supports MySQL/Vitess databases
    PostgresqlSupported bool
    Whether the region supports PostgreSQL databases
    id string
    The ID of the region
    mysql_supported bool
    Whether the region supports MySQL/Vitess databases
    postgresql_supported bool
    Whether the region supports PostgreSQL databases
    id String
    The ID of the region
    mysqlSupported Boolean
    Whether the region supports MySQL/Vitess databases
    postgresqlSupported Boolean
    Whether the region supports PostgreSQL databases
    id string
    The ID of the region
    mysqlSupported boolean
    Whether the region supports MySQL/Vitess databases
    postgresqlSupported boolean
    Whether the region supports PostgreSQL databases
    id str
    The ID of the region
    mysql_supported bool
    Whether the region supports MySQL/Vitess databases
    postgresql_supported bool
    Whether the region supports PostgreSQL databases
    id String
    The ID of the region
    mysqlSupported Boolean
    Whether the region supports MySQL/Vitess databases
    postgresqlSupported Boolean
    Whether the region supports PostgreSQL databases

    Import

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

    terraform

    import {

    to = planetscale_vitess_branch.my_planetscale_vitess_branch

    id = jsonencode({

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

    })

    }

    The pulumi import command can be used, for example:

    $ pulumi import planetscale:index/vitessBranch:VitessBranch my_planetscale_vitess_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.
    Viewing docs for planetscale 1.8.0
    published on Thursday, Aug 13, 2026 by planetscale

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial