1. Registry
  2. Packages
  3. Planetscale Provider
  4. API Docs
  5. VitessKeyspace
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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as planetscale from "@pulumi/planetscale";
    
    // Creating a planetscale_vitess_branch already provisions the branch's default
    // keyspace. Use this resource for additional keyspaces, or import the default
    // keyspace if you need to manage its size or replicas in Terraform.
    //
    // cluster_size and extra_replicas update in place (resize). Apply can take
    // several minutes while provisioning or resizing finishes.
    const example = new planetscale.VitessBranch("example", {
        organization: "example",
        database: "example",
        name: "main",
        clusterSize: "PS_10",
    });
    const exampleVitessKeyspace = new planetscale.VitessKeyspace("example", {
        organization: example.organization,
        database: example.database,
        branch: example.name,
        name: "metrics",
        clusterSize: "PS_10",
        extraReplicas: 0,
    });
    
    import pulumi
    import pulumi_planetscale as planetscale
    
    # Creating a planetscale_vitess_branch already provisions the branch's default
    # keyspace. Use this resource for additional keyspaces, or import the default
    # keyspace if you need to manage its size or replicas in Terraform.
    #
    # cluster_size and extra_replicas update in place (resize). Apply can take
    # several minutes while provisioning or resizing finishes.
    example = planetscale.VitessBranch("example",
        organization="example",
        database="example",
        name="main",
        cluster_size="PS_10")
    example_vitess_keyspace = planetscale.VitessKeyspace("example",
        organization=example.organization,
        database=example.database,
        branch=example.name,
        name="metrics",
        cluster_size="PS_10",
        extra_replicas=0)
    
    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 {
    		// Creating a planetscale_vitess_branch already provisions the branch's default
    		// keyspace. Use this resource for additional keyspaces, or import the default
    		// keyspace if you need to manage its size or replicas in Terraform.
    		//
    		// cluster_size and extra_replicas update in place (resize). Apply can take
    		// several minutes while provisioning or resizing finishes.
    		example, err := planetscale.NewVitessBranch(ctx, "example", &planetscale.VitessBranchArgs{
    			Organization: pulumi.String("example"),
    			Database:     pulumi.String("example"),
    			Name:         pulumi.String("main"),
    			ClusterSize:  pulumi.String("PS_10"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = planetscale.NewVitessKeyspace(ctx, "example", &planetscale.VitessKeyspaceArgs{
    			Organization:  example.Organization,
    			Database:      example.Database,
    			Branch:        example.Name,
    			Name:          pulumi.String("metrics"),
    			ClusterSize:   pulumi.String("PS_10"),
    			ExtraReplicas: pulumi.Float64(0),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Planetscale = Pulumi.Planetscale;
    
    return await Deployment.RunAsync(() => 
    {
        // Creating a planetscale_vitess_branch already provisions the branch's default
        // keyspace. Use this resource for additional keyspaces, or import the default
        // keyspace if you need to manage its size or replicas in Terraform.
        //
        // cluster_size and extra_replicas update in place (resize). Apply can take
        // several minutes while provisioning or resizing finishes.
        var example = new Planetscale.VitessBranch("example", new()
        {
            Organization = "example",
            Database = "example",
            Name = "main",
            ClusterSize = "PS_10",
        });
    
        var exampleVitessKeyspace = new Planetscale.VitessKeyspace("example", new()
        {
            Organization = example.Organization,
            Database = example.Database,
            Branch = example.Name,
            Name = "metrics",
            ClusterSize = "PS_10",
            ExtraReplicas = 0,
        });
    
    });
    
    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 com.pulumi.planetscale.VitessKeyspace;
    import com.pulumi.planetscale.VitessKeyspaceArgs;
    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) {
            // Creating a planetscale_vitess_branch already provisions the branch's default
            // keyspace. Use this resource for additional keyspaces, or import the default
            // keyspace if you need to manage its size or replicas in Terraform.
            //
            // cluster_size and extra_replicas update in place (resize). Apply can take
            // several minutes while provisioning or resizing finishes.
            var example = new VitessBranch("example", VitessBranchArgs.builder()
                .organization("example")
                .database("example")
                .name("main")
                .clusterSize("PS_10")
                .build());
    
            var exampleVitessKeyspace = new VitessKeyspace("exampleVitessKeyspace", VitessKeyspaceArgs.builder()
                .organization(example.organization())
                .database(example.database())
                .branch(example.name())
                .name("metrics")
                .clusterSize("PS_10")
                .extraReplicas(0.0)
                .build());
    
        }
    }
    
    resources:
      # Creating a planetscale_vitess_branch already provisions the branch's default
      # keyspace. Use this resource for additional keyspaces, or import the default
      # keyspace if you need to manage its size or replicas in Terraform.
      #
      # cluster_size and extra_replicas update in place (resize). Apply can take
      # several minutes while provisioning or resizing finishes.
      example:
        type: planetscale:VitessBranch
        properties:
          organization: example
          database: example
          name: main
          clusterSize: PS_10
      exampleVitessKeyspace:
        type: planetscale:VitessKeyspace
        name: example
        properties:
          organization: ${example.organization}
          database: ${example.database}
          branch: ${example.name}
          name: metrics
          clusterSize: PS_10
          extraReplicas: 0
    
    Example coming soon!
    

    Create VitessKeyspace Resource

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

    Constructor syntax

    new VitessKeyspace(name: string, args: VitessKeyspaceArgs, opts?: CustomResourceOptions);
    @overload
    def VitessKeyspace(resource_name: str,
                       args: VitessKeyspaceArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def VitessKeyspace(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       branch: Optional[str] = None,
                       cluster_size: Optional[str] = None,
                       database: Optional[str] = None,
                       organization: Optional[str] = None,
                       extra_replicas: Optional[float] = None,
                       name: Optional[str] = None,
                       shards: Optional[float] = None)
    func NewVitessKeyspace(ctx *Context, name string, args VitessKeyspaceArgs, opts ...ResourceOption) (*VitessKeyspace, error)
    public VitessKeyspace(string name, VitessKeyspaceArgs args, CustomResourceOptions? opts = null)
    public VitessKeyspace(String name, VitessKeyspaceArgs args)
    public VitessKeyspace(String name, VitessKeyspaceArgs args, CustomResourceOptions options)
    
    type: planetscale:VitessKeyspace
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "planetscale_vitess_keyspace" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args VitessKeyspaceArgs
    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 VitessKeyspaceArgs
    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 VitessKeyspaceArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args VitessKeyspaceArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args VitessKeyspaceArgs
    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 vitessKeyspaceResource = new Planetscale.VitessKeyspace("vitessKeyspaceResource", new()
    {
        Branch = "string",
        ClusterSize = "string",
        Database = "string",
        Organization = "string",
        ExtraReplicas = 0,
        Name = "string",
        Shards = 0,
    });
    
    example, err := planetscale.NewVitessKeyspace(ctx, "vitessKeyspaceResource", &planetscale.VitessKeyspaceArgs{
    	Branch:        pulumi.String("string"),
    	ClusterSize:   pulumi.String("string"),
    	Database:      pulumi.String("string"),
    	Organization:  pulumi.String("string"),
    	ExtraReplicas: pulumi.Float64(0),
    	Name:          pulumi.String("string"),
    	Shards:        pulumi.Float64(0),
    })
    
    resource "planetscale_vitess_keyspace" "vitessKeyspaceResource" {
      lifecycle {
        create_before_destroy = true
      }
      branch         = "string"
      cluster_size   = "string"
      database       = "string"
      organization   = "string"
      extra_replicas = 0
      name           = "string"
      shards         = 0
    }
    
    var vitessKeyspaceResource = new VitessKeyspace("vitessKeyspaceResource", VitessKeyspaceArgs.builder()
        .branch("string")
        .clusterSize("string")
        .database("string")
        .organization("string")
        .extraReplicas(0.0)
        .name("string")
        .shards(0.0)
        .build());
    
    vitess_keyspace_resource = planetscale.VitessKeyspace("vitessKeyspaceResource",
        branch="string",
        cluster_size="string",
        database="string",
        organization="string",
        extra_replicas=float(0),
        name="string",
        shards=float(0))
    
    const vitessKeyspaceResource = new planetscale.VitessKeyspace("vitessKeyspaceResource", {
        branch: "string",
        clusterSize: "string",
        database: "string",
        organization: "string",
        extraReplicas: 0,
        name: "string",
        shards: 0,
    });
    
    type: planetscale:VitessKeyspace
    properties:
        branch: string
        clusterSize: string
        database: string
        extraReplicas: 0
        name: string
        organization: string
        shards: 0
    

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

    Branch string
    The name of the branch. Requires replacement if changed.
    ClusterSize string
    The database cluster size name (e.g., PS_10, PS_80). Updates in place via a keyspace resize. Use the List available cluster sizes endpoint for options for your organization.
    Database string
    The name of the database the branch belongs to. Requires replacement if changed.
    Organization string
    The name of the organization the branch belongs to. Requires replacement if changed.
    ExtraReplicas double
    The number of additional replicas beyond the included default. Updates in place via a keyspace resize.
    Name string
    The name of the keyspace. Requires replacement if changed.
    Shards double
    The number of shards. Default: 1. Set only at create time; changing this value requires replacement. Requires replacement if changed.
    Branch string
    The name of the branch. Requires replacement if changed.
    ClusterSize string
    The database cluster size name (e.g., PS_10, PS_80). Updates in place via a keyspace resize. Use the List available cluster sizes endpoint for options for your organization.
    Database string
    The name of the database the branch belongs to. Requires replacement if changed.
    Organization string
    The name of the organization the branch belongs to. Requires replacement if changed.
    ExtraReplicas float64
    The number of additional replicas beyond the included default. Updates in place via a keyspace resize.
    Name string
    The name of the keyspace. Requires replacement if changed.
    Shards float64
    The number of shards. Default: 1. Set only at create time; changing this value requires replacement. Requires replacement if changed.
    branch string
    The name of the branch. Requires replacement if changed.
    cluster_size string
    The database cluster size name (e.g., PS_10, PS_80). Updates in place via a keyspace resize. Use the List available cluster sizes endpoint for options for your organization.
    database string
    The name of the database the branch belongs to. Requires replacement if changed.
    organization string
    The name of the organization the branch belongs to. Requires replacement if changed.
    extra_replicas number
    The number of additional replicas beyond the included default. Updates in place via a keyspace resize.
    name string
    The name of the keyspace. Requires replacement if changed.
    shards number
    The number of shards. Default: 1. Set only at create time; changing this value requires replacement. Requires replacement if changed.
    branch String
    The name of the branch. Requires replacement if changed.
    clusterSize String
    The database cluster size name (e.g., PS_10, PS_80). Updates in place via a keyspace resize. Use the List available cluster sizes endpoint for options for your organization.
    database String
    The name of the database the branch belongs to. Requires replacement if changed.
    organization String
    The name of the organization the branch belongs to. Requires replacement if changed.
    extraReplicas Double
    The number of additional replicas beyond the included default. Updates in place via a keyspace resize.
    name String
    The name of the keyspace. Requires replacement if changed.
    shards Double
    The number of shards. Default: 1. Set only at create time; changing this value requires replacement. Requires replacement if changed.
    branch string
    The name of the branch. Requires replacement if changed.
    clusterSize string
    The database cluster size name (e.g., PS_10, PS_80). Updates in place via a keyspace resize. Use the List available cluster sizes endpoint for options for your organization.
    database string
    The name of the database the branch belongs to. Requires replacement if changed.
    organization string
    The name of the organization the branch belongs to. Requires replacement if changed.
    extraReplicas number
    The number of additional replicas beyond the included default. Updates in place via a keyspace resize.
    name string
    The name of the keyspace. Requires replacement if changed.
    shards number
    The number of shards. Default: 1. Set only at create time; changing this value requires replacement. Requires replacement if changed.
    branch str
    The name of the branch. Requires replacement if changed.
    cluster_size str
    The database cluster size name (e.g., PS_10, PS_80). Updates in place via a keyspace resize. Use the List available cluster sizes endpoint for options for your organization.
    database str
    The name of the database the branch belongs to. Requires replacement if changed.
    organization str
    The name of the organization the branch belongs to. Requires replacement if changed.
    extra_replicas float
    The number of additional replicas beyond the included default. Updates in place via a keyspace resize.
    name str
    The name of the keyspace. Requires replacement if changed.
    shards float
    The number of shards. Default: 1. Set only at create time; changing this value requires replacement. Requires replacement if changed.
    branch String
    The name of the branch. Requires replacement if changed.
    clusterSize String
    The database cluster size name (e.g., PS_10, PS_80). Updates in place via a keyspace resize. Use the List available cluster sizes endpoint for options for your organization.
    database String
    The name of the database the branch belongs to. Requires replacement if changed.
    organization String
    The name of the organization the branch belongs to. Requires replacement if changed.
    extraReplicas Number
    The number of additional replicas beyond the included default. Updates in place via a keyspace resize.
    name String
    The name of the keyspace. Requires replacement if changed.
    shards Number
    The number of shards. Default: 1. Set only at create time; changing this value requires replacement. Requires replacement if changed.

    Outputs

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

    ClusterDisplayName string
    The SKU representing the keyspace cluster size for display
    ConfigChangeInProgress bool
    Is the keyspace undergoing a config change
    CreatedAt string
    When the keyspace was created
    Id string
    The provider-assigned unique ID for this managed resource.
    Imported bool
    Is this keyspace used in an import
    IsDefault bool
    True when this is the branch's default keyspace (usually created with the branch). Import that keyspace to manage its size or replicas; do not try to create it with this resource.
    Metal bool
    Is the keyspace running on metal instances
    NodeTtlStrategy string
    Controls when node TTL drains are allowed
    Ready bool
    Is the keyspace provisioned and serving traffic
    Replicas double
    Total number of replicas in the keyspace
    ReplicationDurabilityConstraints VitessKeyspaceReplicationDurabilityConstraints
    ResizeInProgress bool
    True while any unfinished resize request exists for the keyspace. Computed for observability; apply waits on ready, resizing, resizepending, and configchangeinprogress instead, because this flag can lag after the resize has already applied.
    ResizePending bool
    True while a resize request is queued. The provider waits for this to become false after create and update.
    Resizing bool
    True while the keyspace is actively resizing. The provider waits for this to become false after create and update.
    Sharded bool
    If the keyspace is sharded
    UpdatedAt string
    When the keyspace was last updated
    VectorPoolAllocation double
    Percentage of buffer pool memory allocated to vector indexes
    VreplicationFlags VitessKeyspaceVreplicationFlags
    ClusterDisplayName string
    The SKU representing the keyspace cluster size for display
    ConfigChangeInProgress bool
    Is the keyspace undergoing a config change
    CreatedAt string
    When the keyspace was created
    Id string
    The provider-assigned unique ID for this managed resource.
    Imported bool
    Is this keyspace used in an import
    IsDefault bool
    True when this is the branch's default keyspace (usually created with the branch). Import that keyspace to manage its size or replicas; do not try to create it with this resource.
    Metal bool
    Is the keyspace running on metal instances
    NodeTtlStrategy string
    Controls when node TTL drains are allowed
    Ready bool
    Is the keyspace provisioned and serving traffic
    Replicas float64
    Total number of replicas in the keyspace
    ReplicationDurabilityConstraints VitessKeyspaceReplicationDurabilityConstraints
    ResizeInProgress bool
    True while any unfinished resize request exists for the keyspace. Computed for observability; apply waits on ready, resizing, resizepending, and configchangeinprogress instead, because this flag can lag after the resize has already applied.
    ResizePending bool
    True while a resize request is queued. The provider waits for this to become false after create and update.
    Resizing bool
    True while the keyspace is actively resizing. The provider waits for this to become false after create and update.
    Sharded bool
    If the keyspace is sharded
    UpdatedAt string
    When the keyspace was last updated
    VectorPoolAllocation float64
    Percentage of buffer pool memory allocated to vector indexes
    VreplicationFlags VitessKeyspaceVreplicationFlags
    cluster_display_name string
    The SKU representing the keyspace cluster size for display
    config_change_in_progress bool
    Is the keyspace undergoing a config change
    created_at string
    When the keyspace was created
    id string
    The provider-assigned unique ID for this managed resource.
    imported bool
    Is this keyspace used in an import
    is_default bool
    True when this is the branch's default keyspace (usually created with the branch). Import that keyspace to manage its size or replicas; do not try to create it with this resource.
    metal bool
    Is the keyspace running on metal instances
    node_ttl_strategy string
    Controls when node TTL drains are allowed
    ready bool
    Is the keyspace provisioned and serving traffic
    replicas number
    Total number of replicas in the keyspace
    replication_durability_constraints object
    resize_in_progress bool
    True while any unfinished resize request exists for the keyspace. Computed for observability; apply waits on ready, resizing, resizepending, and configchangeinprogress instead, because this flag can lag after the resize has already applied.
    resize_pending bool
    True while a resize request is queued. The provider waits for this to become false after create and update.
    resizing bool
    True while the keyspace is actively resizing. The provider waits for this to become false after create and update.
    sharded bool
    If the keyspace is sharded
    updated_at string
    When the keyspace was last updated
    vector_pool_allocation number
    Percentage of buffer pool memory allocated to vector indexes
    vreplication_flags object
    clusterDisplayName String
    The SKU representing the keyspace cluster size for display
    configChangeInProgress Boolean
    Is the keyspace undergoing a config change
    createdAt String
    When the keyspace was created
    id String
    The provider-assigned unique ID for this managed resource.
    imported Boolean
    Is this keyspace used in an import
    isDefault Boolean
    True when this is the branch's default keyspace (usually created with the branch). Import that keyspace to manage its size or replicas; do not try to create it with this resource.
    metal Boolean
    Is the keyspace running on metal instances
    nodeTtlStrategy String
    Controls when node TTL drains are allowed
    ready Boolean
    Is the keyspace provisioned and serving traffic
    replicas Double
    Total number of replicas in the keyspace
    replicationDurabilityConstraints VitessKeyspaceReplicationDurabilityConstraints
    resizeInProgress Boolean
    True while any unfinished resize request exists for the keyspace. Computed for observability; apply waits on ready, resizing, resizepending, and configchangeinprogress instead, because this flag can lag after the resize has already applied.
    resizePending Boolean
    True while a resize request is queued. The provider waits for this to become false after create and update.
    resizing Boolean
    True while the keyspace is actively resizing. The provider waits for this to become false after create and update.
    sharded Boolean
    If the keyspace is sharded
    updatedAt String
    When the keyspace was last updated
    vectorPoolAllocation Double
    Percentage of buffer pool memory allocated to vector indexes
    vreplicationFlags VitessKeyspaceVreplicationFlags
    clusterDisplayName string
    The SKU representing the keyspace cluster size for display
    configChangeInProgress boolean
    Is the keyspace undergoing a config change
    createdAt string
    When the keyspace was created
    id string
    The provider-assigned unique ID for this managed resource.
    imported boolean
    Is this keyspace used in an import
    isDefault boolean
    True when this is the branch's default keyspace (usually created with the branch). Import that keyspace to manage its size or replicas; do not try to create it with this resource.
    metal boolean
    Is the keyspace running on metal instances
    nodeTtlStrategy string
    Controls when node TTL drains are allowed
    ready boolean
    Is the keyspace provisioned and serving traffic
    replicas number
    Total number of replicas in the keyspace
    replicationDurabilityConstraints VitessKeyspaceReplicationDurabilityConstraints
    resizeInProgress boolean
    True while any unfinished resize request exists for the keyspace. Computed for observability; apply waits on ready, resizing, resizepending, and configchangeinprogress instead, because this flag can lag after the resize has already applied.
    resizePending boolean
    True while a resize request is queued. The provider waits for this to become false after create and update.
    resizing boolean
    True while the keyspace is actively resizing. The provider waits for this to become false after create and update.
    sharded boolean
    If the keyspace is sharded
    updatedAt string
    When the keyspace was last updated
    vectorPoolAllocation number
    Percentage of buffer pool memory allocated to vector indexes
    vreplicationFlags VitessKeyspaceVreplicationFlags
    cluster_display_name str
    The SKU representing the keyspace cluster size for display
    config_change_in_progress bool
    Is the keyspace undergoing a config change
    created_at str
    When the keyspace was created
    id str
    The provider-assigned unique ID for this managed resource.
    imported bool
    Is this keyspace used in an import
    is_default bool
    True when this is the branch's default keyspace (usually created with the branch). Import that keyspace to manage its size or replicas; do not try to create it with this resource.
    metal bool
    Is the keyspace running on metal instances
    node_ttl_strategy str
    Controls when node TTL drains are allowed
    ready bool
    Is the keyspace provisioned and serving traffic
    replicas float
    Total number of replicas in the keyspace
    replication_durability_constraints VitessKeyspaceReplicationDurabilityConstraints
    resize_in_progress bool
    True while any unfinished resize request exists for the keyspace. Computed for observability; apply waits on ready, resizing, resizepending, and configchangeinprogress instead, because this flag can lag after the resize has already applied.
    resize_pending bool
    True while a resize request is queued. The provider waits for this to become false after create and update.
    resizing bool
    True while the keyspace is actively resizing. The provider waits for this to become false after create and update.
    sharded bool
    If the keyspace is sharded
    updated_at str
    When the keyspace was last updated
    vector_pool_allocation float
    Percentage of buffer pool memory allocated to vector indexes
    vreplication_flags VitessKeyspaceVreplicationFlags
    clusterDisplayName String
    The SKU representing the keyspace cluster size for display
    configChangeInProgress Boolean
    Is the keyspace undergoing a config change
    createdAt String
    When the keyspace was created
    id String
    The provider-assigned unique ID for this managed resource.
    imported Boolean
    Is this keyspace used in an import
    isDefault Boolean
    True when this is the branch's default keyspace (usually created with the branch). Import that keyspace to manage its size or replicas; do not try to create it with this resource.
    metal Boolean
    Is the keyspace running on metal instances
    nodeTtlStrategy String
    Controls when node TTL drains are allowed
    ready Boolean
    Is the keyspace provisioned and serving traffic
    replicas Number
    Total number of replicas in the keyspace
    replicationDurabilityConstraints Property Map
    resizeInProgress Boolean
    True while any unfinished resize request exists for the keyspace. Computed for observability; apply waits on ready, resizing, resizepending, and configchangeinprogress instead, because this flag can lag after the resize has already applied.
    resizePending Boolean
    True while a resize request is queued. The provider waits for this to become false after create and update.
    resizing Boolean
    True while the keyspace is actively resizing. The provider waits for this to become false after create and update.
    sharded Boolean
    If the keyspace is sharded
    updatedAt String
    When the keyspace was last updated
    vectorPoolAllocation Number
    Percentage of buffer pool memory allocated to vector indexes
    vreplicationFlags Property Map

    Look up Existing VitessKeyspace Resource

    Get an existing VitessKeyspace 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?: VitessKeyspaceState, opts?: CustomResourceOptions): VitessKeyspace
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            branch: Optional[str] = None,
            cluster_display_name: Optional[str] = None,
            cluster_size: Optional[str] = None,
            config_change_in_progress: Optional[bool] = None,
            created_at: Optional[str] = None,
            database: Optional[str] = None,
            extra_replicas: Optional[float] = None,
            imported: Optional[bool] = None,
            is_default: Optional[bool] = None,
            metal: Optional[bool] = None,
            name: Optional[str] = None,
            node_ttl_strategy: Optional[str] = None,
            organization: Optional[str] = None,
            ready: Optional[bool] = None,
            replicas: Optional[float] = None,
            replication_durability_constraints: Optional[VitessKeyspaceReplicationDurabilityConstraintsArgs] = None,
            resize_in_progress: Optional[bool] = None,
            resize_pending: Optional[bool] = None,
            resizing: Optional[bool] = None,
            sharded: Optional[bool] = None,
            shards: Optional[float] = None,
            updated_at: Optional[str] = None,
            vector_pool_allocation: Optional[float] = None,
            vreplication_flags: Optional[VitessKeyspaceVreplicationFlagsArgs] = None) -> VitessKeyspace
    func GetVitessKeyspace(ctx *Context, name string, id IDInput, state *VitessKeyspaceState, opts ...ResourceOption) (*VitessKeyspace, error)
    public static VitessKeyspace Get(string name, Input<string> id, VitessKeyspaceState? state, CustomResourceOptions? opts = null)
    public static VitessKeyspace get(String name, Output<String> id, VitessKeyspaceState state, CustomResourceOptions options)
    resources:  _:    type: planetscale:VitessKeyspace    get:      id: ${id}
    import {
      to = planetscale_vitess_keyspace.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:
    Branch string
    The name of the branch. Requires replacement if changed.
    ClusterDisplayName string
    The SKU representing the keyspace cluster size for display
    ClusterSize string
    The database cluster size name (e.g., PS_10, PS_80). Updates in place via a keyspace resize. Use the List available cluster sizes endpoint for options for your organization.
    ConfigChangeInProgress bool
    Is the keyspace undergoing a config change
    CreatedAt string
    When the keyspace was created
    Database string
    The name of the database the branch belongs to. Requires replacement if changed.
    ExtraReplicas double
    The number of additional replicas beyond the included default. Updates in place via a keyspace resize.
    Imported bool
    Is this keyspace used in an import
    IsDefault bool
    True when this is the branch's default keyspace (usually created with the branch). Import that keyspace to manage its size or replicas; do not try to create it with this resource.
    Metal bool
    Is the keyspace running on metal instances
    Name string
    The name of the keyspace. Requires replacement if changed.
    NodeTtlStrategy string
    Controls when node TTL drains are allowed
    Organization string
    The name of the organization the branch belongs to. Requires replacement if changed.
    Ready bool
    Is the keyspace provisioned and serving traffic
    Replicas double
    Total number of replicas in the keyspace
    ReplicationDurabilityConstraints VitessKeyspaceReplicationDurabilityConstraints
    ResizeInProgress bool
    True while any unfinished resize request exists for the keyspace. Computed for observability; apply waits on ready, resizing, resizepending, and configchangeinprogress instead, because this flag can lag after the resize has already applied.
    ResizePending bool
    True while a resize request is queued. The provider waits for this to become false after create and update.
    Resizing bool
    True while the keyspace is actively resizing. The provider waits for this to become false after create and update.
    Sharded bool
    If the keyspace is sharded
    Shards double
    The number of shards. Default: 1. Set only at create time; changing this value requires replacement. Requires replacement if changed.
    UpdatedAt string
    When the keyspace was last updated
    VectorPoolAllocation double
    Percentage of buffer pool memory allocated to vector indexes
    VreplicationFlags VitessKeyspaceVreplicationFlags
    Branch string
    The name of the branch. Requires replacement if changed.
    ClusterDisplayName string
    The SKU representing the keyspace cluster size for display
    ClusterSize string
    The database cluster size name (e.g., PS_10, PS_80). Updates in place via a keyspace resize. Use the List available cluster sizes endpoint for options for your organization.
    ConfigChangeInProgress bool
    Is the keyspace undergoing a config change
    CreatedAt string
    When the keyspace was created
    Database string
    The name of the database the branch belongs to. Requires replacement if changed.
    ExtraReplicas float64
    The number of additional replicas beyond the included default. Updates in place via a keyspace resize.
    Imported bool
    Is this keyspace used in an import
    IsDefault bool
    True when this is the branch's default keyspace (usually created with the branch). Import that keyspace to manage its size or replicas; do not try to create it with this resource.
    Metal bool
    Is the keyspace running on metal instances
    Name string
    The name of the keyspace. Requires replacement if changed.
    NodeTtlStrategy string
    Controls when node TTL drains are allowed
    Organization string
    The name of the organization the branch belongs to. Requires replacement if changed.
    Ready bool
    Is the keyspace provisioned and serving traffic
    Replicas float64
    Total number of replicas in the keyspace
    ReplicationDurabilityConstraints VitessKeyspaceReplicationDurabilityConstraintsArgs
    ResizeInProgress bool
    True while any unfinished resize request exists for the keyspace. Computed for observability; apply waits on ready, resizing, resizepending, and configchangeinprogress instead, because this flag can lag after the resize has already applied.
    ResizePending bool
    True while a resize request is queued. The provider waits for this to become false after create and update.
    Resizing bool
    True while the keyspace is actively resizing. The provider waits for this to become false after create and update.
    Sharded bool
    If the keyspace is sharded
    Shards float64
    The number of shards. Default: 1. Set only at create time; changing this value requires replacement. Requires replacement if changed.
    UpdatedAt string
    When the keyspace was last updated
    VectorPoolAllocation float64
    Percentage of buffer pool memory allocated to vector indexes
    VreplicationFlags VitessKeyspaceVreplicationFlagsArgs
    branch string
    The name of the branch. Requires replacement if changed.
    cluster_display_name string
    The SKU representing the keyspace cluster size for display
    cluster_size string
    The database cluster size name (e.g., PS_10, PS_80). Updates in place via a keyspace resize. Use the List available cluster sizes endpoint for options for your organization.
    config_change_in_progress bool
    Is the keyspace undergoing a config change
    created_at string
    When the keyspace was created
    database string
    The name of the database the branch belongs to. Requires replacement if changed.
    extra_replicas number
    The number of additional replicas beyond the included default. Updates in place via a keyspace resize.
    imported bool
    Is this keyspace used in an import
    is_default bool
    True when this is the branch's default keyspace (usually created with the branch). Import that keyspace to manage its size or replicas; do not try to create it with this resource.
    metal bool
    Is the keyspace running on metal instances
    name string
    The name of the keyspace. Requires replacement if changed.
    node_ttl_strategy string
    Controls when node TTL drains are allowed
    organization string
    The name of the organization the branch belongs to. Requires replacement if changed.
    ready bool
    Is the keyspace provisioned and serving traffic
    replicas number
    Total number of replicas in the keyspace
    replication_durability_constraints object
    resize_in_progress bool
    True while any unfinished resize request exists for the keyspace. Computed for observability; apply waits on ready, resizing, resizepending, and configchangeinprogress instead, because this flag can lag after the resize has already applied.
    resize_pending bool
    True while a resize request is queued. The provider waits for this to become false after create and update.
    resizing bool
    True while the keyspace is actively resizing. The provider waits for this to become false after create and update.
    sharded bool
    If the keyspace is sharded
    shards number
    The number of shards. Default: 1. Set only at create time; changing this value requires replacement. Requires replacement if changed.
    updated_at string
    When the keyspace was last updated
    vector_pool_allocation number
    Percentage of buffer pool memory allocated to vector indexes
    vreplication_flags object
    branch String
    The name of the branch. Requires replacement if changed.
    clusterDisplayName String
    The SKU representing the keyspace cluster size for display
    clusterSize String
    The database cluster size name (e.g., PS_10, PS_80). Updates in place via a keyspace resize. Use the List available cluster sizes endpoint for options for your organization.
    configChangeInProgress Boolean
    Is the keyspace undergoing a config change
    createdAt String
    When the keyspace was created
    database String
    The name of the database the branch belongs to. Requires replacement if changed.
    extraReplicas Double
    The number of additional replicas beyond the included default. Updates in place via a keyspace resize.
    imported Boolean
    Is this keyspace used in an import
    isDefault Boolean
    True when this is the branch's default keyspace (usually created with the branch). Import that keyspace to manage its size or replicas; do not try to create it with this resource.
    metal Boolean
    Is the keyspace running on metal instances
    name String
    The name of the keyspace. Requires replacement if changed.
    nodeTtlStrategy String
    Controls when node TTL drains are allowed
    organization String
    The name of the organization the branch belongs to. Requires replacement if changed.
    ready Boolean
    Is the keyspace provisioned and serving traffic
    replicas Double
    Total number of replicas in the keyspace
    replicationDurabilityConstraints VitessKeyspaceReplicationDurabilityConstraints
    resizeInProgress Boolean
    True while any unfinished resize request exists for the keyspace. Computed for observability; apply waits on ready, resizing, resizepending, and configchangeinprogress instead, because this flag can lag after the resize has already applied.
    resizePending Boolean
    True while a resize request is queued. The provider waits for this to become false after create and update.
    resizing Boolean
    True while the keyspace is actively resizing. The provider waits for this to become false after create and update.
    sharded Boolean
    If the keyspace is sharded
    shards Double
    The number of shards. Default: 1. Set only at create time; changing this value requires replacement. Requires replacement if changed.
    updatedAt String
    When the keyspace was last updated
    vectorPoolAllocation Double
    Percentage of buffer pool memory allocated to vector indexes
    vreplicationFlags VitessKeyspaceVreplicationFlags
    branch string
    The name of the branch. Requires replacement if changed.
    clusterDisplayName string
    The SKU representing the keyspace cluster size for display
    clusterSize string
    The database cluster size name (e.g., PS_10, PS_80). Updates in place via a keyspace resize. Use the List available cluster sizes endpoint for options for your organization.
    configChangeInProgress boolean
    Is the keyspace undergoing a config change
    createdAt string
    When the keyspace was created
    database string
    The name of the database the branch belongs to. Requires replacement if changed.
    extraReplicas number
    The number of additional replicas beyond the included default. Updates in place via a keyspace resize.
    imported boolean
    Is this keyspace used in an import
    isDefault boolean
    True when this is the branch's default keyspace (usually created with the branch). Import that keyspace to manage its size or replicas; do not try to create it with this resource.
    metal boolean
    Is the keyspace running on metal instances
    name string
    The name of the keyspace. Requires replacement if changed.
    nodeTtlStrategy string
    Controls when node TTL drains are allowed
    organization string
    The name of the organization the branch belongs to. Requires replacement if changed.
    ready boolean
    Is the keyspace provisioned and serving traffic
    replicas number
    Total number of replicas in the keyspace
    replicationDurabilityConstraints VitessKeyspaceReplicationDurabilityConstraints
    resizeInProgress boolean
    True while any unfinished resize request exists for the keyspace. Computed for observability; apply waits on ready, resizing, resizepending, and configchangeinprogress instead, because this flag can lag after the resize has already applied.
    resizePending boolean
    True while a resize request is queued. The provider waits for this to become false after create and update.
    resizing boolean
    True while the keyspace is actively resizing. The provider waits for this to become false after create and update.
    sharded boolean
    If the keyspace is sharded
    shards number
    The number of shards. Default: 1. Set only at create time; changing this value requires replacement. Requires replacement if changed.
    updatedAt string
    When the keyspace was last updated
    vectorPoolAllocation number
    Percentage of buffer pool memory allocated to vector indexes
    vreplicationFlags VitessKeyspaceVreplicationFlags
    branch str
    The name of the branch. Requires replacement if changed.
    cluster_display_name str
    The SKU representing the keyspace cluster size for display
    cluster_size str
    The database cluster size name (e.g., PS_10, PS_80). Updates in place via a keyspace resize. Use the List available cluster sizes endpoint for options for your organization.
    config_change_in_progress bool
    Is the keyspace undergoing a config change
    created_at str
    When the keyspace was created
    database str
    The name of the database the branch belongs to. Requires replacement if changed.
    extra_replicas float
    The number of additional replicas beyond the included default. Updates in place via a keyspace resize.
    imported bool
    Is this keyspace used in an import
    is_default bool
    True when this is the branch's default keyspace (usually created with the branch). Import that keyspace to manage its size or replicas; do not try to create it with this resource.
    metal bool
    Is the keyspace running on metal instances
    name str
    The name of the keyspace. Requires replacement if changed.
    node_ttl_strategy str
    Controls when node TTL drains are allowed
    organization str
    The name of the organization the branch belongs to. Requires replacement if changed.
    ready bool
    Is the keyspace provisioned and serving traffic
    replicas float
    Total number of replicas in the keyspace
    replication_durability_constraints VitessKeyspaceReplicationDurabilityConstraintsArgs
    resize_in_progress bool
    True while any unfinished resize request exists for the keyspace. Computed for observability; apply waits on ready, resizing, resizepending, and configchangeinprogress instead, because this flag can lag after the resize has already applied.
    resize_pending bool
    True while a resize request is queued. The provider waits for this to become false after create and update.
    resizing bool
    True while the keyspace is actively resizing. The provider waits for this to become false after create and update.
    sharded bool
    If the keyspace is sharded
    shards float
    The number of shards. Default: 1. Set only at create time; changing this value requires replacement. Requires replacement if changed.
    updated_at str
    When the keyspace was last updated
    vector_pool_allocation float
    Percentage of buffer pool memory allocated to vector indexes
    vreplication_flags VitessKeyspaceVreplicationFlagsArgs
    branch String
    The name of the branch. Requires replacement if changed.
    clusterDisplayName String
    The SKU representing the keyspace cluster size for display
    clusterSize String
    The database cluster size name (e.g., PS_10, PS_80). Updates in place via a keyspace resize. Use the List available cluster sizes endpoint for options for your organization.
    configChangeInProgress Boolean
    Is the keyspace undergoing a config change
    createdAt String
    When the keyspace was created
    database String
    The name of the database the branch belongs to. Requires replacement if changed.
    extraReplicas Number
    The number of additional replicas beyond the included default. Updates in place via a keyspace resize.
    imported Boolean
    Is this keyspace used in an import
    isDefault Boolean
    True when this is the branch's default keyspace (usually created with the branch). Import that keyspace to manage its size or replicas; do not try to create it with this resource.
    metal Boolean
    Is the keyspace running on metal instances
    name String
    The name of the keyspace. Requires replacement if changed.
    nodeTtlStrategy String
    Controls when node TTL drains are allowed
    organization String
    The name of the organization the branch belongs to. Requires replacement if changed.
    ready Boolean
    Is the keyspace provisioned and serving traffic
    replicas Number
    Total number of replicas in the keyspace
    replicationDurabilityConstraints Property Map
    resizeInProgress Boolean
    True while any unfinished resize request exists for the keyspace. Computed for observability; apply waits on ready, resizing, resizepending, and configchangeinprogress instead, because this flag can lag after the resize has already applied.
    resizePending Boolean
    True while a resize request is queued. The provider waits for this to become false after create and update.
    resizing Boolean
    True while the keyspace is actively resizing. The provider waits for this to become false after create and update.
    sharded Boolean
    If the keyspace is sharded
    shards Number
    The number of shards. Default: 1. Set only at create time; changing this value requires replacement. Requires replacement if changed.
    updatedAt String
    When the keyspace was last updated
    vectorPoolAllocation Number
    Percentage of buffer pool memory allocated to vector indexes
    vreplicationFlags Property Map

    Supporting Types

    VitessKeyspaceReplicationDurabilityConstraints, VitessKeyspaceReplicationDurabilityConstraintsArgs

    Strategy string
    The replication durability strategy
    Strategy string
    The replication durability strategy
    strategy string
    The replication durability strategy
    strategy String
    The replication durability strategy
    strategy string
    The replication durability strategy
    strategy str
    The replication durability strategy
    strategy String
    The replication durability strategy

    VitessKeyspaceVreplicationFlags, VitessKeyspaceVreplicationFlagsArgs

    AllowNoBlobBinlogRowImage bool
    Allow no blob binlog row image
    OptimizeInserts bool
    Enable optimized inserts
    VplayerBatching bool
    Enable VPlayer batching
    AllowNoBlobBinlogRowImage bool
    Allow no blob binlog row image
    OptimizeInserts bool
    Enable optimized inserts
    VplayerBatching bool
    Enable VPlayer batching
    allow_no_blob_binlog_row_image bool
    Allow no blob binlog row image
    optimize_inserts bool
    Enable optimized inserts
    vplayer_batching bool
    Enable VPlayer batching
    allowNoBlobBinlogRowImage Boolean
    Allow no blob binlog row image
    optimizeInserts Boolean
    Enable optimized inserts
    vplayerBatching Boolean
    Enable VPlayer batching
    allowNoBlobBinlogRowImage boolean
    Allow no blob binlog row image
    optimizeInserts boolean
    Enable optimized inserts
    vplayerBatching boolean
    Enable VPlayer batching
    allow_no_blob_binlog_row_image bool
    Allow no blob binlog row image
    optimize_inserts bool
    Enable optimized inserts
    vplayer_batching bool
    Enable VPlayer batching
    allowNoBlobBinlogRowImage Boolean
    Allow no blob binlog row image
    optimizeInserts Boolean
    Enable optimized inserts
    vplayerBatching Boolean
    Enable VPlayer batching

    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_keyspace.my_planetscale_vitess_keyspace

    id = jsonencode({

    branch       = "..."
    
    database     = "..."
    
    name         = "..."
    
    organization = "..."
    

    })

    }

    The pulumi import command can be used, for example:

    $ pulumi import planetscale:index/vitessKeyspace:VitessKeyspace my_planetscale_vitess_keyspace '{"branch": "...", "database": "...", "name": "...", "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