1. Registry
  2. Packages
  3. Planetscale Provider
  4. API Docs
  5. NekiBranch
Viewing docs for planetscale 1.11.0
published on Friday, Sep 18, 2026 by planetscale
Viewing docs for planetscale 1.11.0
published on Friday, Sep 18, 2026 by planetscale

    NekiBranch Resource

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as planetscale from "@pulumi/planetscale";
    
    const myNekiBranch = new planetscale.NekiBranch("my_neki_branch", {
        organization: "my-organization",
        database: "my-neki-database",
        name: "main",
        deletionProtected: true,
    });
    
    import pulumi
    import pulumi_planetscale as planetscale
    
    my_neki_branch = planetscale.NekiBranch("my_neki_branch",
        organization="my-organization",
        database="my-neki-database",
        name="main",
        deletion_protected=True)
    
    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.NewNekiBranch(ctx, "my_neki_branch", &planetscale.NekiBranchArgs{
    			Organization:      pulumi.String("my-organization"),
    			Database:          pulumi.String("my-neki-database"),
    			Name:              pulumi.String("main"),
    			DeletionProtected: pulumi.Bool(true),
    		})
    		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 myNekiBranch = new Planetscale.NekiBranch("my_neki_branch", new()
        {
            Organization = "my-organization",
            Database = "my-neki-database",
            Name = "main",
            DeletionProtected = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.planetscale.NekiBranch;
    import com.pulumi.planetscale.NekiBranchArgs;
    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 myNekiBranch = new NekiBranch("myNekiBranch", NekiBranchArgs.builder()
                .organization("my-organization")
                .database("my-neki-database")
                .name("main")
                .deletionProtected(true)
                .build());
    
        }
    }
    
    resources:
      myNekiBranch:
        type: planetscale:NekiBranch
        name: my_neki_branch
        properties:
          organization: my-organization
          database: my-neki-database
          name: main
          deletionProtected: true
    
    Example coming soon!
    

    Create NekiBranch Resource

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

    Constructor syntax

    new NekiBranch(name: string, args: NekiBranchArgs, opts?: CustomResourceOptions);
    @overload
    def NekiBranch(resource_name: str,
                   args: NekiBranchArgs,
                   opts: Optional[ResourceOptions] = None)
    
    @overload
    def NekiBranch(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   database: Optional[str] = None,
                   organization: Optional[str] = None,
                   backup_id: Optional[str] = None,
                   delete_descendants: Optional[bool] = None,
                   deletion_protected: Optional[bool] = None,
                   name: Optional[str] = None,
                   parent_branch: Optional[str] = None,
                   region: Optional[str] = None,
                   restore_point: Optional[str] = None)
    func NewNekiBranch(ctx *Context, name string, args NekiBranchArgs, opts ...ResourceOption) (*NekiBranch, error)
    public NekiBranch(string name, NekiBranchArgs args, CustomResourceOptions? opts = null)
    public NekiBranch(String name, NekiBranchArgs args)
    public NekiBranch(String name, NekiBranchArgs args, CustomResourceOptions options)
    
    type: planetscale:NekiBranch
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "planetscale_neki_branch" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args NekiBranchArgs
    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 NekiBranchArgs
    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 NekiBranchArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NekiBranchArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NekiBranchArgs
    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 nekiBranchResource = new Planetscale.NekiBranch("nekiBranchResource", new()
    {
        Database = "string",
        Organization = "string",
        BackupId = "string",
        DeleteDescendants = false,
        DeletionProtected = false,
        Name = "string",
        ParentBranch = "string",
        Region = "string",
        RestorePoint = "string",
    });
    
    example, err := planetscale.NewNekiBranch(ctx, "nekiBranchResource", &planetscale.NekiBranchArgs{
    	Database:          pulumi.String("string"),
    	Organization:      pulumi.String("string"),
    	BackupId:          pulumi.String("string"),
    	DeleteDescendants: pulumi.Bool(false),
    	DeletionProtected: pulumi.Bool(false),
    	Name:              pulumi.String("string"),
    	ParentBranch:      pulumi.String("string"),
    	Region:            pulumi.String("string"),
    	RestorePoint:      pulumi.String("string"),
    })
    
    resource "planetscale_neki_branch" "nekiBranchResource" {
      lifecycle {
        create_before_destroy = true
      }
      database           = "string"
      organization       = "string"
      backup_id          = "string"
      delete_descendants = false
      deletion_protected = false
      name               = "string"
      parent_branch      = "string"
      region             = "string"
      restore_point      = "string"
    }
    
    var nekiBranchResource = new NekiBranch("nekiBranchResource", NekiBranchArgs.builder()
        .database("string")
        .organization("string")
        .backupId("string")
        .deleteDescendants(false)
        .deletionProtected(false)
        .name("string")
        .parentBranch("string")
        .region("string")
        .restorePoint("string")
        .build());
    
    neki_branch_resource = planetscale.NekiBranch("nekiBranchResource",
        database="string",
        organization="string",
        backup_id="string",
        delete_descendants=False,
        deletion_protected=False,
        name="string",
        parent_branch="string",
        region="string",
        restore_point="string")
    
    const nekiBranchResource = new planetscale.NekiBranch("nekiBranchResource", {
        database: "string",
        organization: "string",
        backupId: "string",
        deleteDescendants: false,
        deletionProtected: false,
        name: "string",
        parentBranch: "string",
        region: "string",
        restorePoint: "string",
    });
    
    type: planetscale:NekiBranch
    properties:
        backupId: string
        database: string
        deleteDescendants: false
        deletionProtected: false
        name: string
        organization: string
        parentBranch: string
        region: string
        restorePoint: string
    

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

    Database string
    Database name slug from list_databases. Example: app-db. Requires replacement if changed.
    Organization string
    Organization name slug from list_organizations. Example: acme. Requires replacement if changed.
    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.
    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.
    RestorePoint string
    Restore the Neki branch from a point-in-time recovery timestamp, for example 2026-01-01T00:00:00Z. Requires replacement if changed.
    Database string
    Database name slug from list_databases. Example: app-db. Requires replacement if changed.
    Organization string
    Organization name slug from list_organizations. Example: acme. Requires replacement if changed.
    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.
    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.
    RestorePoint string
    Restore the Neki branch from a point-in-time recovery timestamp, for example 2026-01-01T00:00:00Z. Requires replacement if changed.
    database string
    Database name slug from list_databases. Example: app-db. Requires replacement if changed.
    organization string
    Organization name slug from list_organizations. Example: acme. Requires replacement if changed.
    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.
    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.
    restore_point string
    Restore the Neki branch from a point-in-time recovery timestamp, for example 2026-01-01T00:00:00Z. Requires replacement if changed.
    database String
    Database name slug from list_databases. Example: app-db. Requires replacement if changed.
    organization String
    Organization name slug from list_organizations. Example: acme. Requires replacement if changed.
    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.
    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.
    restorePoint String
    Restore the Neki branch from a point-in-time recovery timestamp, for example 2026-01-01T00:00:00Z. Requires replacement if changed.
    database string
    Database name slug from list_databases. Example: app-db. Requires replacement if changed.
    organization string
    Organization name slug from list_organizations. Example: acme. Requires replacement if changed.
    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.
    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.
    restorePoint string
    Restore the Neki branch from a point-in-time recovery timestamp, for example 2026-01-01T00:00:00Z. Requires replacement if changed.
    database str
    Database name slug from list_databases. Example: app-db. Requires replacement if changed.
    organization str
    Organization name slug from list_organizations. Example: acme. Requires replacement if changed.
    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.
    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.
    restore_point str
    Restore the Neki branch from a point-in-time recovery timestamp, for example 2026-01-01T00:00:00Z. Requires replacement if changed.
    database String
    Database name slug from list_databases. Example: app-db. Requires replacement if changed.
    organization String
    Organization name slug from list_organizations. Example: acme. Requires replacement if changed.
    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.
    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.
    restorePoint String
    Restore the Neki branch from a point-in-time recovery timestamp, for example 2026-01-01T00:00:00Z. Requires replacement if changed.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    State string
    The current state of the branch
    Id string
    The provider-assigned unique ID for this managed resource.
    State string
    The current state of the branch
    id string
    The provider-assigned unique ID for this managed resource.
    state string
    The current state of the branch
    id String
    The provider-assigned unique ID for this managed resource.
    state String
    The current state of the branch
    id string
    The provider-assigned unique ID for this managed resource.
    state string
    The current state of the branch
    id str
    The provider-assigned unique ID for this managed resource.
    state str
    The current state of the branch
    id String
    The provider-assigned unique ID for this managed resource.
    state String
    The current state of the branch

    Look up Existing NekiBranch Resource

    Get an existing NekiBranch 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?: NekiBranchState, opts?: CustomResourceOptions): NekiBranch
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            backup_id: Optional[str] = None,
            database: Optional[str] = None,
            delete_descendants: Optional[bool] = None,
            deletion_protected: Optional[bool] = None,
            name: Optional[str] = None,
            organization: Optional[str] = None,
            parent_branch: Optional[str] = None,
            region: Optional[str] = None,
            restore_point: Optional[str] = None,
            state: Optional[str] = None) -> NekiBranch
    func GetNekiBranch(ctx *Context, name string, id IDInput, state *NekiBranchState, opts ...ResourceOption) (*NekiBranch, error)
    public static NekiBranch Get(string name, Input<string> id, NekiBranchState? state, CustomResourceOptions? opts = null)
    public static NekiBranch get(String name, Output<String> id, NekiBranchState state, CustomResourceOptions options)
    resources:  _:    type: planetscale:NekiBranch    get:      id: ${id}
    import {
      to = planetscale_neki_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:
    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.
    Database string
    Database name slug from list_databases. Example: app-db. 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
    Organization string
    Organization name slug from list_organizations. Example: acme. Requires replacement if changed.
    ParentBranch string
    The name of the parent branch. Defaults to the database's default branch if not provided. Requires replacement if changed.
    Region string
    The region to create the branch in. If not provided, the branch will be created in the default region for its database. Requires replacement if changed.
    RestorePoint string
    Restore the Neki branch from a point-in-time recovery timestamp, for example 2026-01-01T00:00:00Z. Requires replacement if changed.
    State string
    The current state of the branch
    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.
    Database string
    Database name slug from list_databases. Example: app-db. 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
    Organization string
    Organization name slug from list_organizations. Example: acme. Requires replacement if changed.
    ParentBranch string
    The name of the parent branch. Defaults to the database's default branch if not provided. Requires replacement if changed.
    Region string
    The region to create the branch in. If not provided, the branch will be created in the default region for its database. Requires replacement if changed.
    RestorePoint string
    Restore the Neki branch from a point-in-time recovery timestamp, for example 2026-01-01T00:00:00Z. Requires replacement if changed.
    State string
    The current state of the branch
    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.
    database string
    Database name slug from list_databases. Example: app-db. 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
    organization string
    Organization name slug from list_organizations. Example: acme. Requires replacement if changed.
    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.
    restore_point string
    Restore the Neki branch from a point-in-time recovery timestamp, for example 2026-01-01T00:00:00Z. Requires replacement if changed.
    state string
    The current state of the branch
    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.
    database String
    Database name slug from list_databases. Example: app-db. 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
    organization String
    Organization name slug from list_organizations. Example: acme. Requires replacement if changed.
    parentBranch String
    The name of the parent branch. Defaults to the database's default branch if not provided. Requires replacement if changed.
    region String
    The region to create the branch in. If not provided, the branch will be created in the default region for its database. Requires replacement if changed.
    restorePoint String
    Restore the Neki branch from a point-in-time recovery timestamp, for example 2026-01-01T00:00:00Z. Requires replacement if changed.
    state String
    The current state of the branch
    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.
    database string
    Database name slug from list_databases. Example: app-db. 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
    organization string
    Organization name slug from list_organizations. Example: acme. Requires replacement if changed.
    parentBranch string
    The name of the parent branch. Defaults to the database's default branch if not provided. Requires replacement if changed.
    region string
    The region to create the branch in. If not provided, the branch will be created in the default region for its database. Requires replacement if changed.
    restorePoint string
    Restore the Neki branch from a point-in-time recovery timestamp, for example 2026-01-01T00:00:00Z. Requires replacement if changed.
    state string
    The current state of the branch
    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.
    database str
    Database name slug from list_databases. Example: app-db. 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
    organization str
    Organization name slug from list_organizations. Example: acme. Requires replacement if changed.
    parent_branch str
    The name of the parent branch. Defaults to the database's default branch if not provided. Requires replacement if changed.
    region str
    The region to create the branch in. If not provided, the branch will be created in the default region for its database. Requires replacement if changed.
    restore_point str
    Restore the Neki branch from a point-in-time recovery timestamp, for example 2026-01-01T00:00:00Z. Requires replacement if changed.
    state str
    The current state of the branch
    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.
    database String
    Database name slug from list_databases. Example: app-db. 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
    organization String
    Organization name slug from list_organizations. Example: acme. Requires replacement if changed.
    parentBranch String
    The name of the parent branch. Defaults to the database's default branch if not provided. Requires replacement if changed.
    region String
    The region to create the branch in. If not provided, the branch will be created in the default region for its database. Requires replacement if changed.
    restorePoint String
    Restore the Neki branch from a point-in-time recovery timestamp, for example 2026-01-01T00:00:00Z. Requires replacement if changed.
    state String
    The current state of the branch

    Import

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

    terraform

    import {

    to = planetscale_neki_branch.my_planetscale_neki_branch

    id = jsonencode({

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

    })

    }

    The pulumi import command can be used, for example:

    $ pulumi import planetscale:index/nekiBranch:NekiBranch my_planetscale_neki_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.11.0
    published on Friday, Sep 18, 2026 by planetscale

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial