1. Packages
  2. Supabase Provider
  3. API Docs
  4. Branch
supabase 1.5.1 published on Wednesday, Jan 15, 2025 by supabase

supabase.Branch

Explore with Pulumi AI

supabase logo
supabase 1.5.1 published on Wednesday, Jan 15, 2025 by supabase

    Branch database resource

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as supabase from "@pulumi/supabase";
    
    const _new = new supabase.Branch("new", {
        gitBranch: "main",
        parentProjectRef: "mayuaycdtijbctgqbycg",
    });
    
    import pulumi
    import pulumi_supabase as supabase
    
    new = supabase.Branch("new",
        git_branch="main",
        parent_project_ref="mayuaycdtijbctgqbycg")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/supabase/supabase"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := supabase.NewBranch(ctx, "new", &supabase.BranchArgs{
    			GitBranch:        pulumi.String("main"),
    			ParentProjectRef: pulumi.String("mayuaycdtijbctgqbycg"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Supabase = Pulumi.Supabase;
    
    return await Deployment.RunAsync(() => 
    {
        var @new = new Supabase.Branch("new", new()
        {
            GitBranch = "main",
            ParentProjectRef = "mayuaycdtijbctgqbycg",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.supabase.Branch;
    import com.pulumi.supabase.BranchArgs;
    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 new_ = new Branch("new", BranchArgs.builder()
                .gitBranch("main")
                .parentProjectRef("mayuaycdtijbctgqbycg")
                .build());
    
        }
    }
    
    resources:
      new:
        type: supabase:Branch
        properties:
          gitBranch: main
          parentProjectRef: mayuaycdtijbctgqbycg
    

    Create Branch Resource

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

    Constructor syntax

    new Branch(name: string, args: BranchArgs, opts?: CustomResourceOptions);
    @overload
    def Branch(resource_name: str,
               args: BranchArgs,
               opts: Optional[ResourceOptions] = None)
    
    @overload
    def Branch(resource_name: str,
               opts: Optional[ResourceOptions] = None,
               git_branch: Optional[str] = None,
               parent_project_ref: Optional[str] = None,
               region: Optional[str] = None)
    func NewBranch(ctx *Context, name string, args BranchArgs, opts ...ResourceOption) (*Branch, error)
    public Branch(string name, BranchArgs args, CustomResourceOptions? opts = null)
    public Branch(String name, BranchArgs args)
    public Branch(String name, BranchArgs args, CustomResourceOptions options)
    
    type: supabase:Branch
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args BranchArgs
    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 BranchArgs
    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 BranchArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BranchArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BranchArgs
    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 branchResource = new Supabase.Branch("branchResource", new()
    {
        GitBranch = "string",
        ParentProjectRef = "string",
        Region = "string",
    });
    
    example, err := supabase.NewBranch(ctx, "branchResource", &supabase.BranchArgs{
    	GitBranch:        pulumi.String("string"),
    	ParentProjectRef: pulumi.String("string"),
    	Region:           pulumi.String("string"),
    })
    
    var branchResource = new Branch("branchResource", BranchArgs.builder()
        .gitBranch("string")
        .parentProjectRef("string")
        .region("string")
        .build());
    
    branch_resource = supabase.Branch("branchResource",
        git_branch="string",
        parent_project_ref="string",
        region="string")
    
    const branchResource = new supabase.Branch("branchResource", {
        gitBranch: "string",
        parentProjectRef: "string",
        region: "string",
    });
    
    type: supabase:Branch
    properties:
        gitBranch: string
        parentProjectRef: string
        region: string
    

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

    GitBranch string
    Git branch
    ParentProjectRef string
    Parent project ref
    Region string
    Database region
    GitBranch string
    Git branch
    ParentProjectRef string
    Parent project ref
    Region string
    Database region
    gitBranch String
    Git branch
    parentProjectRef String
    Parent project ref
    region String
    Database region
    gitBranch string
    Git branch
    parentProjectRef string
    Parent project ref
    region string
    Database region
    git_branch str
    Git branch
    parent_project_ref str
    Parent project ref
    region str
    Database region
    gitBranch String
    Git branch
    parentProjectRef String
    Parent project ref
    region String
    Database region

    Outputs

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

    Database BranchDatabase
    Database connection details
    Id string
    The provider-assigned unique ID for this managed resource.
    Database BranchDatabase
    Database connection details
    Id string
    The provider-assigned unique ID for this managed resource.
    database BranchDatabase
    Database connection details
    id String
    The provider-assigned unique ID for this managed resource.
    database BranchDatabase
    Database connection details
    id string
    The provider-assigned unique ID for this managed resource.
    database BranchDatabase
    Database connection details
    id str
    The provider-assigned unique ID for this managed resource.
    database Property Map
    Database connection details
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing Branch Resource

    Get an existing Branch 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?: BranchState, opts?: CustomResourceOptions): Branch
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            database: Optional[BranchDatabaseArgs] = None,
            git_branch: Optional[str] = None,
            parent_project_ref: Optional[str] = None,
            region: Optional[str] = None) -> Branch
    func GetBranch(ctx *Context, name string, id IDInput, state *BranchState, opts ...ResourceOption) (*Branch, error)
    public static Branch Get(string name, Input<string> id, BranchState? state, CustomResourceOptions? opts = null)
    public static Branch get(String name, Output<String> id, BranchState state, CustomResourceOptions options)
    resources:  _:    type: supabase:Branch    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    Database BranchDatabase
    Database connection details
    GitBranch string
    Git branch
    ParentProjectRef string
    Parent project ref
    Region string
    Database region
    Database BranchDatabaseArgs
    Database connection details
    GitBranch string
    Git branch
    ParentProjectRef string
    Parent project ref
    Region string
    Database region
    database BranchDatabase
    Database connection details
    gitBranch String
    Git branch
    parentProjectRef String
    Parent project ref
    region String
    Database region
    database BranchDatabase
    Database connection details
    gitBranch string
    Git branch
    parentProjectRef string
    Parent project ref
    region string
    Database region
    database BranchDatabaseArgs
    Database connection details
    git_branch str
    Git branch
    parent_project_ref str
    Parent project ref
    region str
    Database region
    database Property Map
    Database connection details
    gitBranch String
    Git branch
    parentProjectRef String
    Parent project ref
    region String
    Database region

    Supporting Types

    BranchDatabase, BranchDatabaseArgs

    Host string
    Host
    Id string
    Branch project ref
    JwtSecret string
    JWT secret
    Password string
    Password
    Port double
    Port
    Status string
    Status
    User string
    User
    Version string
    Postgres version
    Host string
    Host
    Id string
    Branch project ref
    JwtSecret string
    JWT secret
    Password string
    Password
    Port float64
    Port
    Status string
    Status
    User string
    User
    Version string
    Postgres version
    host String
    Host
    id String
    Branch project ref
    jwtSecret String
    JWT secret
    password String
    Password
    port Double
    Port
    status String
    Status
    user String
    User
    version String
    Postgres version
    host string
    Host
    id string
    Branch project ref
    jwtSecret string
    JWT secret
    password string
    Password
    port number
    Port
    status string
    Status
    user string
    User
    version string
    Postgres version
    host str
    Host
    id str
    Branch project ref
    jwt_secret str
    JWT secret
    password str
    Password
    port float
    Port
    status str
    Status
    user str
    User
    version str
    Postgres version
    host String
    Host
    id String
    Branch project ref
    jwtSecret String
    JWT secret
    password String
    Password
    port Number
    Port
    status String
    Status
    user String
    User
    version String
    Postgres version

    Package Details

    Repository
    supabase supabase/terraform-provider-supabase
    License
    Notes
    This Pulumi package is based on the supabase Terraform Provider.
    supabase logo
    supabase 1.5.1 published on Wednesday, Jan 15, 2025 by supabase