1. Packages
  2. Bitbucket Provider
  3. API Docs
  4. BranchingModel
bitbucket 2.46.0 published on Monday, Apr 14, 2025 by drfaust92

bitbucket.BranchingModel

Explore with Pulumi AI

bitbucket logo
bitbucket 2.46.0 published on Monday, Apr 14, 2025 by drfaust92

    Provides a Bitbucket branching model resource.

    This allows you for setting up branching models for your repository.

    OAuth2 Scopes: repository:admin

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as bitbucket from "@pulumi/bitbucket";
    
    // Manage your repositories branching models
    const testRepository = new bitbucket.Repository("testRepository", {owner: "example"});
    const testBranchingModel = new bitbucket.BranchingModel("testBranchingModel", {
        owner: "example",
        repository: testRepository.name,
        development: {
            useMainbranch: true,
        },
        branchTypes: [
            {
                enabled: true,
                kind: "feature",
                prefix: "test/",
            },
            {
                enabled: true,
                kind: "hotfix",
                prefix: "hotfix/",
            },
            {
                enabled: true,
                kind: "release",
                prefix: "release/",
            },
            {
                enabled: true,
                kind: "bugfix",
                prefix: "bugfix/",
            },
        ],
    });
    
    import pulumi
    import pulumi_bitbucket as bitbucket
    
    # Manage your repositories branching models
    test_repository = bitbucket.Repository("testRepository", owner="example")
    test_branching_model = bitbucket.BranchingModel("testBranchingModel",
        owner="example",
        repository=test_repository.name,
        development={
            "use_mainbranch": True,
        },
        branch_types=[
            {
                "enabled": True,
                "kind": "feature",
                "prefix": "test/",
            },
            {
                "enabled": True,
                "kind": "hotfix",
                "prefix": "hotfix/",
            },
            {
                "enabled": True,
                "kind": "release",
                "prefix": "release/",
            },
            {
                "enabled": True,
                "kind": "bugfix",
                "prefix": "bugfix/",
            },
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/bitbucket/v2/bitbucket"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Manage your repositories branching models
    		testRepository, err := bitbucket.NewRepository(ctx, "testRepository", &bitbucket.RepositoryArgs{
    			Owner: pulumi.String("example"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = bitbucket.NewBranchingModel(ctx, "testBranchingModel", &bitbucket.BranchingModelArgs{
    			Owner:      pulumi.String("example"),
    			Repository: testRepository.Name,
    			Development: &bitbucket.BranchingModelDevelopmentArgs{
    				UseMainbranch: pulumi.Bool(true),
    			},
    			BranchTypes: bitbucket.BranchingModelBranchTypeArray{
    				&bitbucket.BranchingModelBranchTypeArgs{
    					Enabled: pulumi.Bool(true),
    					Kind:    pulumi.String("feature"),
    					Prefix:  pulumi.String("test/"),
    				},
    				&bitbucket.BranchingModelBranchTypeArgs{
    					Enabled: pulumi.Bool(true),
    					Kind:    pulumi.String("hotfix"),
    					Prefix:  pulumi.String("hotfix/"),
    				},
    				&bitbucket.BranchingModelBranchTypeArgs{
    					Enabled: pulumi.Bool(true),
    					Kind:    pulumi.String("release"),
    					Prefix:  pulumi.String("release/"),
    				},
    				&bitbucket.BranchingModelBranchTypeArgs{
    					Enabled: pulumi.Bool(true),
    					Kind:    pulumi.String("bugfix"),
    					Prefix:  pulumi.String("bugfix/"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Bitbucket = Pulumi.Bitbucket;
    
    return await Deployment.RunAsync(() => 
    {
        // Manage your repositories branching models
        var testRepository = new Bitbucket.Repository("testRepository", new()
        {
            Owner = "example",
        });
    
        var testBranchingModel = new Bitbucket.BranchingModel("testBranchingModel", new()
        {
            Owner = "example",
            Repository = testRepository.Name,
            Development = new Bitbucket.Inputs.BranchingModelDevelopmentArgs
            {
                UseMainbranch = true,
            },
            BranchTypes = new[]
            {
                new Bitbucket.Inputs.BranchingModelBranchTypeArgs
                {
                    Enabled = true,
                    Kind = "feature",
                    Prefix = "test/",
                },
                new Bitbucket.Inputs.BranchingModelBranchTypeArgs
                {
                    Enabled = true,
                    Kind = "hotfix",
                    Prefix = "hotfix/",
                },
                new Bitbucket.Inputs.BranchingModelBranchTypeArgs
                {
                    Enabled = true,
                    Kind = "release",
                    Prefix = "release/",
                },
                new Bitbucket.Inputs.BranchingModelBranchTypeArgs
                {
                    Enabled = true,
                    Kind = "bugfix",
                    Prefix = "bugfix/",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.bitbucket.Repository;
    import com.pulumi.bitbucket.RepositoryArgs;
    import com.pulumi.bitbucket.BranchingModel;
    import com.pulumi.bitbucket.BranchingModelArgs;
    import com.pulumi.bitbucket.inputs.BranchingModelDevelopmentArgs;
    import com.pulumi.bitbucket.inputs.BranchingModelBranchTypeArgs;
    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) {
            // Manage your repositories branching models
            var testRepository = new Repository("testRepository", RepositoryArgs.builder()
                .owner("example")
                .build());
    
            var testBranchingModel = new BranchingModel("testBranchingModel", BranchingModelArgs.builder()
                .owner("example")
                .repository(testRepository.name())
                .development(BranchingModelDevelopmentArgs.builder()
                    .useMainbranch(true)
                    .build())
                .branchTypes(            
                    BranchingModelBranchTypeArgs.builder()
                        .enabled(true)
                        .kind("feature")
                        .prefix("test/")
                        .build(),
                    BranchingModelBranchTypeArgs.builder()
                        .enabled(true)
                        .kind("hotfix")
                        .prefix("hotfix/")
                        .build(),
                    BranchingModelBranchTypeArgs.builder()
                        .enabled(true)
                        .kind("release")
                        .prefix("release/")
                        .build(),
                    BranchingModelBranchTypeArgs.builder()
                        .enabled(true)
                        .kind("bugfix")
                        .prefix("bugfix/")
                        .build())
                .build());
    
        }
    }
    
    resources:
      # Manage your repositories branching models
      testRepository:
        type: bitbucket:Repository
        properties:
          owner: example
      testBranchingModel:
        type: bitbucket:BranchingModel
        properties:
          owner: example
          repository: ${testRepository.name}
          development:
            useMainbranch: true
          branchTypes:
            - enabled: true
              kind: feature
              prefix: test/
            - enabled: true
              kind: hotfix
              prefix: hotfix/
            - enabled: true
              kind: release
              prefix: release/
            - enabled: true
              kind: bugfix
              prefix: bugfix/
    

    Create BranchingModel Resource

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

    Constructor syntax

    new BranchingModel(name: string, args: BranchingModelArgs, opts?: CustomResourceOptions);
    @overload
    def BranchingModel(resource_name: str,
                       args: BranchingModelArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def BranchingModel(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       development: Optional[BranchingModelDevelopmentArgs] = None,
                       owner: Optional[str] = None,
                       repository: Optional[str] = None,
                       branch_types: Optional[Sequence[BranchingModelBranchTypeArgs]] = None,
                       branching_model_id: Optional[str] = None,
                       production: Optional[BranchingModelProductionArgs] = None)
    func NewBranchingModel(ctx *Context, name string, args BranchingModelArgs, opts ...ResourceOption) (*BranchingModel, error)
    public BranchingModel(string name, BranchingModelArgs args, CustomResourceOptions? opts = null)
    public BranchingModel(String name, BranchingModelArgs args)
    public BranchingModel(String name, BranchingModelArgs args, CustomResourceOptions options)
    
    type: bitbucket:BranchingModel
    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 BranchingModelArgs
    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 BranchingModelArgs
    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 BranchingModelArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args BranchingModelArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args BranchingModelArgs
    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 branchingModelResource = new Bitbucket.BranchingModel("branchingModelResource", new()
    {
        Development = new Bitbucket.Inputs.BranchingModelDevelopmentArgs
        {
            BranchDoesNotExist = false,
            IsValid = false,
            Name = "string",
            UseMainbranch = false,
        },
        Owner = "string",
        Repository = "string",
        BranchTypes = new[]
        {
            new Bitbucket.Inputs.BranchingModelBranchTypeArgs
            {
                Kind = "string",
                Enabled = false,
                Prefix = "string",
            },
        },
        BranchingModelId = "string",
        Production = new Bitbucket.Inputs.BranchingModelProductionArgs
        {
            BranchDoesNotExist = false,
            Enabled = false,
            IsValid = false,
            Name = "string",
            UseMainbranch = false,
        },
    });
    
    example, err := bitbucket.NewBranchingModel(ctx, "branchingModelResource", &bitbucket.BranchingModelArgs{
    	Development: &bitbucket.BranchingModelDevelopmentArgs{
    		BranchDoesNotExist: pulumi.Bool(false),
    		IsValid:            pulumi.Bool(false),
    		Name:               pulumi.String("string"),
    		UseMainbranch:      pulumi.Bool(false),
    	},
    	Owner:      pulumi.String("string"),
    	Repository: pulumi.String("string"),
    	BranchTypes: bitbucket.BranchingModelBranchTypeArray{
    		&bitbucket.BranchingModelBranchTypeArgs{
    			Kind:    pulumi.String("string"),
    			Enabled: pulumi.Bool(false),
    			Prefix:  pulumi.String("string"),
    		},
    	},
    	BranchingModelId: pulumi.String("string"),
    	Production: &bitbucket.BranchingModelProductionArgs{
    		BranchDoesNotExist: pulumi.Bool(false),
    		Enabled:            pulumi.Bool(false),
    		IsValid:            pulumi.Bool(false),
    		Name:               pulumi.String("string"),
    		UseMainbranch:      pulumi.Bool(false),
    	},
    })
    
    var branchingModelResource = new BranchingModel("branchingModelResource", BranchingModelArgs.builder()
        .development(BranchingModelDevelopmentArgs.builder()
            .branchDoesNotExist(false)
            .isValid(false)
            .name("string")
            .useMainbranch(false)
            .build())
        .owner("string")
        .repository("string")
        .branchTypes(BranchingModelBranchTypeArgs.builder()
            .kind("string")
            .enabled(false)
            .prefix("string")
            .build())
        .branchingModelId("string")
        .production(BranchingModelProductionArgs.builder()
            .branchDoesNotExist(false)
            .enabled(false)
            .isValid(false)
            .name("string")
            .useMainbranch(false)
            .build())
        .build());
    
    branching_model_resource = bitbucket.BranchingModel("branchingModelResource",
        development={
            "branch_does_not_exist": False,
            "is_valid": False,
            "name": "string",
            "use_mainbranch": False,
        },
        owner="string",
        repository="string",
        branch_types=[{
            "kind": "string",
            "enabled": False,
            "prefix": "string",
        }],
        branching_model_id="string",
        production={
            "branch_does_not_exist": False,
            "enabled": False,
            "is_valid": False,
            "name": "string",
            "use_mainbranch": False,
        })
    
    const branchingModelResource = new bitbucket.BranchingModel("branchingModelResource", {
        development: {
            branchDoesNotExist: false,
            isValid: false,
            name: "string",
            useMainbranch: false,
        },
        owner: "string",
        repository: "string",
        branchTypes: [{
            kind: "string",
            enabled: false,
            prefix: "string",
        }],
        branchingModelId: "string",
        production: {
            branchDoesNotExist: false,
            enabled: false,
            isValid: false,
            name: "string",
            useMainbranch: false,
        },
    });
    
    type: bitbucket:BranchingModel
    properties:
        branchTypes:
            - enabled: false
              kind: string
              prefix: string
        branchingModelId: string
        development:
            branchDoesNotExist: false
            isValid: false
            name: string
            useMainbranch: false
        owner: string
        production:
            branchDoesNotExist: false
            enabled: false
            isValid: false
            name: string
            useMainbranch: false
        repository: string
    

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

    Development BranchingModelDevelopment
    The development branch can be configured to a specific branch or to track the main branch. When set to a specific branch it must currently exist. Only the passed properties will be updated. The properties not passed will be left unchanged. A request without a development property will leave the development branch unchanged. See Development below.
    Owner string
    The owner of this repository. Can be you or any team you have write access to.
    Repository string
    The name of the repository.
    BranchTypes List<BranchingModelBranchType>
    A set of branch type to define feature, bugfix, release, hotfix prefixes. See Branch Type below.
    BranchingModelId string
    Production BranchingModelProduction
    The production branch can be a specific branch, the main branch or disabled. When set to a specific branch it must currently exist. The enabled property can be used to enable (true) or disable (false) it. Only the passed properties will be updated. The properties not passed will be left unchanged. A request without a production property will leave the production branch unchanged. See Production below.
    Development BranchingModelDevelopmentArgs
    The development branch can be configured to a specific branch or to track the main branch. When set to a specific branch it must currently exist. Only the passed properties will be updated. The properties not passed will be left unchanged. A request without a development property will leave the development branch unchanged. See Development below.
    Owner string
    The owner of this repository. Can be you or any team you have write access to.
    Repository string
    The name of the repository.
    BranchTypes []BranchingModelBranchTypeArgs
    A set of branch type to define feature, bugfix, release, hotfix prefixes. See Branch Type below.
    BranchingModelId string
    Production BranchingModelProductionArgs
    The production branch can be a specific branch, the main branch or disabled. When set to a specific branch it must currently exist. The enabled property can be used to enable (true) or disable (false) it. Only the passed properties will be updated. The properties not passed will be left unchanged. A request without a production property will leave the production branch unchanged. See Production below.
    development BranchingModelDevelopment
    The development branch can be configured to a specific branch or to track the main branch. When set to a specific branch it must currently exist. Only the passed properties will be updated. The properties not passed will be left unchanged. A request without a development property will leave the development branch unchanged. See Development below.
    owner String
    The owner of this repository. Can be you or any team you have write access to.
    repository String
    The name of the repository.
    branchTypes List<BranchingModelBranchType>
    A set of branch type to define feature, bugfix, release, hotfix prefixes. See Branch Type below.
    branchingModelId String
    production BranchingModelProduction
    The production branch can be a specific branch, the main branch or disabled. When set to a specific branch it must currently exist. The enabled property can be used to enable (true) or disable (false) it. Only the passed properties will be updated. The properties not passed will be left unchanged. A request without a production property will leave the production branch unchanged. See Production below.
    development BranchingModelDevelopment
    The development branch can be configured to a specific branch or to track the main branch. When set to a specific branch it must currently exist. Only the passed properties will be updated. The properties not passed will be left unchanged. A request without a development property will leave the development branch unchanged. See Development below.
    owner string
    The owner of this repository. Can be you or any team you have write access to.
    repository string
    The name of the repository.
    branchTypes BranchingModelBranchType[]
    A set of branch type to define feature, bugfix, release, hotfix prefixes. See Branch Type below.
    branchingModelId string
    production BranchingModelProduction
    The production branch can be a specific branch, the main branch or disabled. When set to a specific branch it must currently exist. The enabled property can be used to enable (true) or disable (false) it. Only the passed properties will be updated. The properties not passed will be left unchanged. A request without a production property will leave the production branch unchanged. See Production below.
    development BranchingModelDevelopmentArgs
    The development branch can be configured to a specific branch or to track the main branch. When set to a specific branch it must currently exist. Only the passed properties will be updated. The properties not passed will be left unchanged. A request without a development property will leave the development branch unchanged. See Development below.
    owner str
    The owner of this repository. Can be you or any team you have write access to.
    repository str
    The name of the repository.
    branch_types Sequence[BranchingModelBranchTypeArgs]
    A set of branch type to define feature, bugfix, release, hotfix prefixes. See Branch Type below.
    branching_model_id str
    production BranchingModelProductionArgs
    The production branch can be a specific branch, the main branch or disabled. When set to a specific branch it must currently exist. The enabled property can be used to enable (true) or disable (false) it. Only the passed properties will be updated. The properties not passed will be left unchanged. A request without a production property will leave the production branch unchanged. See Production below.
    development Property Map
    The development branch can be configured to a specific branch or to track the main branch. When set to a specific branch it must currently exist. Only the passed properties will be updated. The properties not passed will be left unchanged. A request without a development property will leave the development branch unchanged. See Development below.
    owner String
    The owner of this repository. Can be you or any team you have write access to.
    repository String
    The name of the repository.
    branchTypes List<Property Map>
    A set of branch type to define feature, bugfix, release, hotfix prefixes. See Branch Type below.
    branchingModelId String
    production Property Map
    The production branch can be a specific branch, the main branch or disabled. When set to a specific branch it must currently exist. The enabled property can be used to enable (true) or disable (false) it. Only the passed properties will be updated. The properties not passed will be left unchanged. A request without a production property will leave the production branch unchanged. See Production below.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing BranchingModel Resource

    Get an existing BranchingModel 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?: BranchingModelState, opts?: CustomResourceOptions): BranchingModel
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            branch_types: Optional[Sequence[BranchingModelBranchTypeArgs]] = None,
            branching_model_id: Optional[str] = None,
            development: Optional[BranchingModelDevelopmentArgs] = None,
            owner: Optional[str] = None,
            production: Optional[BranchingModelProductionArgs] = None,
            repository: Optional[str] = None) -> BranchingModel
    func GetBranchingModel(ctx *Context, name string, id IDInput, state *BranchingModelState, opts ...ResourceOption) (*BranchingModel, error)
    public static BranchingModel Get(string name, Input<string> id, BranchingModelState? state, CustomResourceOptions? opts = null)
    public static BranchingModel get(String name, Output<String> id, BranchingModelState state, CustomResourceOptions options)
    resources:  _:    type: bitbucket:BranchingModel    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:
    BranchTypes List<BranchingModelBranchType>
    A set of branch type to define feature, bugfix, release, hotfix prefixes. See Branch Type below.
    BranchingModelId string
    Development BranchingModelDevelopment
    The development branch can be configured to a specific branch or to track the main branch. When set to a specific branch it must currently exist. Only the passed properties will be updated. The properties not passed will be left unchanged. A request without a development property will leave the development branch unchanged. See Development below.
    Owner string
    The owner of this repository. Can be you or any team you have write access to.
    Production BranchingModelProduction
    The production branch can be a specific branch, the main branch or disabled. When set to a specific branch it must currently exist. The enabled property can be used to enable (true) or disable (false) it. Only the passed properties will be updated. The properties not passed will be left unchanged. A request without a production property will leave the production branch unchanged. See Production below.
    Repository string
    The name of the repository.
    BranchTypes []BranchingModelBranchTypeArgs
    A set of branch type to define feature, bugfix, release, hotfix prefixes. See Branch Type below.
    BranchingModelId string
    Development BranchingModelDevelopmentArgs
    The development branch can be configured to a specific branch or to track the main branch. When set to a specific branch it must currently exist. Only the passed properties will be updated. The properties not passed will be left unchanged. A request without a development property will leave the development branch unchanged. See Development below.
    Owner string
    The owner of this repository. Can be you or any team you have write access to.
    Production BranchingModelProductionArgs
    The production branch can be a specific branch, the main branch or disabled. When set to a specific branch it must currently exist. The enabled property can be used to enable (true) or disable (false) it. Only the passed properties will be updated. The properties not passed will be left unchanged. A request without a production property will leave the production branch unchanged. See Production below.
    Repository string
    The name of the repository.
    branchTypes List<BranchingModelBranchType>
    A set of branch type to define feature, bugfix, release, hotfix prefixes. See Branch Type below.
    branchingModelId String
    development BranchingModelDevelopment
    The development branch can be configured to a specific branch or to track the main branch. When set to a specific branch it must currently exist. Only the passed properties will be updated. The properties not passed will be left unchanged. A request without a development property will leave the development branch unchanged. See Development below.
    owner String
    The owner of this repository. Can be you or any team you have write access to.
    production BranchingModelProduction
    The production branch can be a specific branch, the main branch or disabled. When set to a specific branch it must currently exist. The enabled property can be used to enable (true) or disable (false) it. Only the passed properties will be updated. The properties not passed will be left unchanged. A request without a production property will leave the production branch unchanged. See Production below.
    repository String
    The name of the repository.
    branchTypes BranchingModelBranchType[]
    A set of branch type to define feature, bugfix, release, hotfix prefixes. See Branch Type below.
    branchingModelId string
    development BranchingModelDevelopment
    The development branch can be configured to a specific branch or to track the main branch. When set to a specific branch it must currently exist. Only the passed properties will be updated. The properties not passed will be left unchanged. A request without a development property will leave the development branch unchanged. See Development below.
    owner string
    The owner of this repository. Can be you or any team you have write access to.
    production BranchingModelProduction
    The production branch can be a specific branch, the main branch or disabled. When set to a specific branch it must currently exist. The enabled property can be used to enable (true) or disable (false) it. Only the passed properties will be updated. The properties not passed will be left unchanged. A request without a production property will leave the production branch unchanged. See Production below.
    repository string
    The name of the repository.
    branch_types Sequence[BranchingModelBranchTypeArgs]
    A set of branch type to define feature, bugfix, release, hotfix prefixes. See Branch Type below.
    branching_model_id str
    development BranchingModelDevelopmentArgs
    The development branch can be configured to a specific branch or to track the main branch. When set to a specific branch it must currently exist. Only the passed properties will be updated. The properties not passed will be left unchanged. A request without a development property will leave the development branch unchanged. See Development below.
    owner str
    The owner of this repository. Can be you or any team you have write access to.
    production BranchingModelProductionArgs
    The production branch can be a specific branch, the main branch or disabled. When set to a specific branch it must currently exist. The enabled property can be used to enable (true) or disable (false) it. Only the passed properties will be updated. The properties not passed will be left unchanged. A request without a production property will leave the production branch unchanged. See Production below.
    repository str
    The name of the repository.
    branchTypes List<Property Map>
    A set of branch type to define feature, bugfix, release, hotfix prefixes. See Branch Type below.
    branchingModelId String
    development Property Map
    The development branch can be configured to a specific branch or to track the main branch. When set to a specific branch it must currently exist. Only the passed properties will be updated. The properties not passed will be left unchanged. A request without a development property will leave the development branch unchanged. See Development below.
    owner String
    The owner of this repository. Can be you or any team you have write access to.
    production Property Map
    The production branch can be a specific branch, the main branch or disabled. When set to a specific branch it must currently exist. The enabled property can be used to enable (true) or disable (false) it. Only the passed properties will be updated. The properties not passed will be left unchanged. A request without a production property will leave the production branch unchanged. See Production below.
    repository String
    The name of the repository.

    Supporting Types

    BranchingModelBranchType, BranchingModelBranchTypeArgs

    Kind string
    The kind of the branch type. Valid values are feature, bugfix, release, hotfix.
    Enabled bool
    Whether the branch type is enabled or not. A disabled branch type may contain an invalid prefix.
    Prefix string
    The prefix for this branch type. A branch with this prefix will be classified as per kind. The prefix of an enabled branch type must be a valid branch prefix. Additionally, it cannot be blank, empty or null. The prefix for a disabled branch type can be empty or invalid.
    Kind string
    The kind of the branch type. Valid values are feature, bugfix, release, hotfix.
    Enabled bool
    Whether the branch type is enabled or not. A disabled branch type may contain an invalid prefix.
    Prefix string
    The prefix for this branch type. A branch with this prefix will be classified as per kind. The prefix of an enabled branch type must be a valid branch prefix. Additionally, it cannot be blank, empty or null. The prefix for a disabled branch type can be empty or invalid.
    kind String
    The kind of the branch type. Valid values are feature, bugfix, release, hotfix.
    enabled Boolean
    Whether the branch type is enabled or not. A disabled branch type may contain an invalid prefix.
    prefix String
    The prefix for this branch type. A branch with this prefix will be classified as per kind. The prefix of an enabled branch type must be a valid branch prefix. Additionally, it cannot be blank, empty or null. The prefix for a disabled branch type can be empty or invalid.
    kind string
    The kind of the branch type. Valid values are feature, bugfix, release, hotfix.
    enabled boolean
    Whether the branch type is enabled or not. A disabled branch type may contain an invalid prefix.
    prefix string
    The prefix for this branch type. A branch with this prefix will be classified as per kind. The prefix of an enabled branch type must be a valid branch prefix. Additionally, it cannot be blank, empty or null. The prefix for a disabled branch type can be empty or invalid.
    kind str
    The kind of the branch type. Valid values are feature, bugfix, release, hotfix.
    enabled bool
    Whether the branch type is enabled or not. A disabled branch type may contain an invalid prefix.
    prefix str
    The prefix for this branch type. A branch with this prefix will be classified as per kind. The prefix of an enabled branch type must be a valid branch prefix. Additionally, it cannot be blank, empty or null. The prefix for a disabled branch type can be empty or invalid.
    kind String
    The kind of the branch type. Valid values are feature, bugfix, release, hotfix.
    enabled Boolean
    Whether the branch type is enabled or not. A disabled branch type may contain an invalid prefix.
    prefix String
    The prefix for this branch type. A branch with this prefix will be classified as per kind. The prefix of an enabled branch type must be a valid branch prefix. Additionally, it cannot be blank, empty or null. The prefix for a disabled branch type can be empty or invalid.

    BranchingModelDevelopment, BranchingModelDevelopmentArgs

    BranchDoesNotExist bool
    Optional and only returned for a repository's branching model. Indicates if the indicated branch exists on the repository (false) or not (true). This is useful for determining a fallback to the mainbranch when a repository is inheriting its project's branching model.
    IsValid bool
    Name string
    The configured branch. It must be null when use_mainbranch is true. Otherwise it must be a non-empty value. It is possible for the configured branch to not exist (e.g. it was deleted after the settings are set).
    UseMainbranch bool
    Indicates if the setting points at an explicit branch (false) or tracks the main branch (true). When true the name must be null or not provided. When false the name must contain a non-empty branch name.
    BranchDoesNotExist bool
    Optional and only returned for a repository's branching model. Indicates if the indicated branch exists on the repository (false) or not (true). This is useful for determining a fallback to the mainbranch when a repository is inheriting its project's branching model.
    IsValid bool
    Name string
    The configured branch. It must be null when use_mainbranch is true. Otherwise it must be a non-empty value. It is possible for the configured branch to not exist (e.g. it was deleted after the settings are set).
    UseMainbranch bool
    Indicates if the setting points at an explicit branch (false) or tracks the main branch (true). When true the name must be null or not provided. When false the name must contain a non-empty branch name.
    branchDoesNotExist Boolean
    Optional and only returned for a repository's branching model. Indicates if the indicated branch exists on the repository (false) or not (true). This is useful for determining a fallback to the mainbranch when a repository is inheriting its project's branching model.
    isValid Boolean
    name String
    The configured branch. It must be null when use_mainbranch is true. Otherwise it must be a non-empty value. It is possible for the configured branch to not exist (e.g. it was deleted after the settings are set).
    useMainbranch Boolean
    Indicates if the setting points at an explicit branch (false) or tracks the main branch (true). When true the name must be null or not provided. When false the name must contain a non-empty branch name.
    branchDoesNotExist boolean
    Optional and only returned for a repository's branching model. Indicates if the indicated branch exists on the repository (false) or not (true). This is useful for determining a fallback to the mainbranch when a repository is inheriting its project's branching model.
    isValid boolean
    name string
    The configured branch. It must be null when use_mainbranch is true. Otherwise it must be a non-empty value. It is possible for the configured branch to not exist (e.g. it was deleted after the settings are set).
    useMainbranch boolean
    Indicates if the setting points at an explicit branch (false) or tracks the main branch (true). When true the name must be null or not provided. When false the name must contain a non-empty branch name.
    branch_does_not_exist bool
    Optional and only returned for a repository's branching model. Indicates if the indicated branch exists on the repository (false) or not (true). This is useful for determining a fallback to the mainbranch when a repository is inheriting its project's branching model.
    is_valid bool
    name str
    The configured branch. It must be null when use_mainbranch is true. Otherwise it must be a non-empty value. It is possible for the configured branch to not exist (e.g. it was deleted after the settings are set).
    use_mainbranch bool
    Indicates if the setting points at an explicit branch (false) or tracks the main branch (true). When true the name must be null or not provided. When false the name must contain a non-empty branch name.
    branchDoesNotExist Boolean
    Optional and only returned for a repository's branching model. Indicates if the indicated branch exists on the repository (false) or not (true). This is useful for determining a fallback to the mainbranch when a repository is inheriting its project's branching model.
    isValid Boolean
    name String
    The configured branch. It must be null when use_mainbranch is true. Otherwise it must be a non-empty value. It is possible for the configured branch to not exist (e.g. it was deleted after the settings are set).
    useMainbranch Boolean
    Indicates if the setting points at an explicit branch (false) or tracks the main branch (true). When true the name must be null or not provided. When false the name must contain a non-empty branch name.

    BranchingModelProduction, BranchingModelProductionArgs

    BranchDoesNotExist bool
    Optional and only returned for a repository's branching model. Indicates if the indicated branch exists on the repository (false) or not (true). This is useful for determining a fallback to the mainbranch when a repository is inheriting its project's branching model.
    Enabled bool
    Indicates if branch is enabled or not.
    IsValid bool
    Name string
    The configured branch. It must be null when use_mainbranch is true. Otherwise it must be a non-empty value. It is possible for the configured branch to not exist (e.g. it was deleted after the settings are set).
    UseMainbranch bool
    Indicates if the setting points at an explicit branch (false) or tracks the main branch (true). When true the name must be null or not provided. When false the name must contain a non-empty branch name.
    BranchDoesNotExist bool
    Optional and only returned for a repository's branching model. Indicates if the indicated branch exists on the repository (false) or not (true). This is useful for determining a fallback to the mainbranch when a repository is inheriting its project's branching model.
    Enabled bool
    Indicates if branch is enabled or not.
    IsValid bool
    Name string
    The configured branch. It must be null when use_mainbranch is true. Otherwise it must be a non-empty value. It is possible for the configured branch to not exist (e.g. it was deleted after the settings are set).
    UseMainbranch bool
    Indicates if the setting points at an explicit branch (false) or tracks the main branch (true). When true the name must be null or not provided. When false the name must contain a non-empty branch name.
    branchDoesNotExist Boolean
    Optional and only returned for a repository's branching model. Indicates if the indicated branch exists on the repository (false) or not (true). This is useful for determining a fallback to the mainbranch when a repository is inheriting its project's branching model.
    enabled Boolean
    Indicates if branch is enabled or not.
    isValid Boolean
    name String
    The configured branch. It must be null when use_mainbranch is true. Otherwise it must be a non-empty value. It is possible for the configured branch to not exist (e.g. it was deleted after the settings are set).
    useMainbranch Boolean
    Indicates if the setting points at an explicit branch (false) or tracks the main branch (true). When true the name must be null or not provided. When false the name must contain a non-empty branch name.
    branchDoesNotExist boolean
    Optional and only returned for a repository's branching model. Indicates if the indicated branch exists on the repository (false) or not (true). This is useful for determining a fallback to the mainbranch when a repository is inheriting its project's branching model.
    enabled boolean
    Indicates if branch is enabled or not.
    isValid boolean
    name string
    The configured branch. It must be null when use_mainbranch is true. Otherwise it must be a non-empty value. It is possible for the configured branch to not exist (e.g. it was deleted after the settings are set).
    useMainbranch boolean
    Indicates if the setting points at an explicit branch (false) or tracks the main branch (true). When true the name must be null or not provided. When false the name must contain a non-empty branch name.
    branch_does_not_exist bool
    Optional and only returned for a repository's branching model. Indicates if the indicated branch exists on the repository (false) or not (true). This is useful for determining a fallback to the mainbranch when a repository is inheriting its project's branching model.
    enabled bool
    Indicates if branch is enabled or not.
    is_valid bool
    name str
    The configured branch. It must be null when use_mainbranch is true. Otherwise it must be a non-empty value. It is possible for the configured branch to not exist (e.g. it was deleted after the settings are set).
    use_mainbranch bool
    Indicates if the setting points at an explicit branch (false) or tracks the main branch (true). When true the name must be null or not provided. When false the name must contain a non-empty branch name.
    branchDoesNotExist Boolean
    Optional and only returned for a repository's branching model. Indicates if the indicated branch exists on the repository (false) or not (true). This is useful for determining a fallback to the mainbranch when a repository is inheriting its project's branching model.
    enabled Boolean
    Indicates if branch is enabled or not.
    isValid Boolean
    name String
    The configured branch. It must be null when use_mainbranch is true. Otherwise it must be a non-empty value. It is possible for the configured branch to not exist (e.g. it was deleted after the settings are set).
    useMainbranch Boolean
    Indicates if the setting points at an explicit branch (false) or tracks the main branch (true). When true the name must be null or not provided. When false the name must contain a non-empty branch name.

    Import

    Branching Models can be imported using the owner and repo separated by a (/), e.g.,

    $ pulumi import bitbucket:index/branchingModel:BranchingModel example owner/repo
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    bitbucket drfaust92/terraform-provider-bitbucket
    License
    Notes
    This Pulumi package is based on the bitbucket Terraform Provider.
    bitbucket logo
    bitbucket 2.46.0 published on Monday, Apr 14, 2025 by drfaust92