azuredevops.BranchPolicyMergeTypes
Explore with Pulumi AI
Branch policy for merge types allowed on a specified branch.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azuredevops from "@pulumi/azuredevops";
const example = new azuredevops.Project("example", {name: "Example Project"});
const exampleGit = new azuredevops.Git("example", {
    projectId: example.id,
    name: "Example Repository",
    initialization: {
        initType: "Clean",
    },
});
const exampleBranchPolicyMergeTypes = new azuredevops.BranchPolicyMergeTypes("example", {
    projectId: example.id,
    enabled: true,
    blocking: true,
    settings: {
        allowSquash: true,
        allowRebaseAndFastForward: true,
        allowBasicNoFastForward: true,
        allowRebaseWithMerge: true,
        scopes: [
            {
                repositoryId: exampleGit.id,
                repositoryRef: exampleGit.defaultBranch,
                matchType: "Exact",
            },
            {
                repositoryId: undefined,
                repositoryRef: "refs/heads/releases",
                matchType: "Prefix",
            },
            {
                matchType: "DefaultBranch",
            },
        ],
    },
});
import pulumi
import pulumi_azuredevops as azuredevops
example = azuredevops.Project("example", name="Example Project")
example_git = azuredevops.Git("example",
    project_id=example.id,
    name="Example Repository",
    initialization={
        "init_type": "Clean",
    })
example_branch_policy_merge_types = azuredevops.BranchPolicyMergeTypes("example",
    project_id=example.id,
    enabled=True,
    blocking=True,
    settings={
        "allow_squash": True,
        "allow_rebase_and_fast_forward": True,
        "allow_basic_no_fast_forward": True,
        "allow_rebase_with_merge": True,
        "scopes": [
            {
                "repository_id": example_git.id,
                "repository_ref": example_git.default_branch,
                "match_type": "Exact",
            },
            {
                "repository_id": None,
                "repository_ref": "refs/heads/releases",
                "match_type": "Prefix",
            },
            {
                "match_type": "DefaultBranch",
            },
        ],
    })
package main
import (
	"github.com/pulumi/pulumi-azuredevops/sdk/v3/go/azuredevops"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		example, err := azuredevops.NewProject(ctx, "example", &azuredevops.ProjectArgs{
			Name: pulumi.String("Example Project"),
		})
		if err != nil {
			return err
		}
		exampleGit, err := azuredevops.NewGit(ctx, "example", &azuredevops.GitArgs{
			ProjectId: example.ID(),
			Name:      pulumi.String("Example Repository"),
			Initialization: &azuredevops.GitInitializationArgs{
				InitType: pulumi.String("Clean"),
			},
		})
		if err != nil {
			return err
		}
		_, err = azuredevops.NewBranchPolicyMergeTypes(ctx, "example", &azuredevops.BranchPolicyMergeTypesArgs{
			ProjectId: example.ID(),
			Enabled:   pulumi.Bool(true),
			Blocking:  pulumi.Bool(true),
			Settings: &azuredevops.BranchPolicyMergeTypesSettingsArgs{
				AllowSquash:               pulumi.Bool(true),
				AllowRebaseAndFastForward: pulumi.Bool(true),
				AllowBasicNoFastForward:   pulumi.Bool(true),
				AllowRebaseWithMerge:      pulumi.Bool(true),
				Scopes: azuredevops.BranchPolicyMergeTypesSettingsScopeArray{
					&azuredevops.BranchPolicyMergeTypesSettingsScopeArgs{
						RepositoryId:  exampleGit.ID(),
						RepositoryRef: exampleGit.DefaultBranch,
						MatchType:     pulumi.String("Exact"),
					},
					&azuredevops.BranchPolicyMergeTypesSettingsScopeArgs{
						RepositoryId:  nil,
						RepositoryRef: pulumi.String("refs/heads/releases"),
						MatchType:     pulumi.String("Prefix"),
					},
					&azuredevops.BranchPolicyMergeTypesSettingsScopeArgs{
						MatchType: pulumi.String("DefaultBranch"),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureDevOps = Pulumi.AzureDevOps;
return await Deployment.RunAsync(() => 
{
    var example = new AzureDevOps.Project("example", new()
    {
        Name = "Example Project",
    });
    var exampleGit = new AzureDevOps.Git("example", new()
    {
        ProjectId = example.Id,
        Name = "Example Repository",
        Initialization = new AzureDevOps.Inputs.GitInitializationArgs
        {
            InitType = "Clean",
        },
    });
    var exampleBranchPolicyMergeTypes = new AzureDevOps.BranchPolicyMergeTypes("example", new()
    {
        ProjectId = example.Id,
        Enabled = true,
        Blocking = true,
        Settings = new AzureDevOps.Inputs.BranchPolicyMergeTypesSettingsArgs
        {
            AllowSquash = true,
            AllowRebaseAndFastForward = true,
            AllowBasicNoFastForward = true,
            AllowRebaseWithMerge = true,
            Scopes = new[]
            {
                new AzureDevOps.Inputs.BranchPolicyMergeTypesSettingsScopeArgs
                {
                    RepositoryId = exampleGit.Id,
                    RepositoryRef = exampleGit.DefaultBranch,
                    MatchType = "Exact",
                },
                new AzureDevOps.Inputs.BranchPolicyMergeTypesSettingsScopeArgs
                {
                    RepositoryId = null,
                    RepositoryRef = "refs/heads/releases",
                    MatchType = "Prefix",
                },
                new AzureDevOps.Inputs.BranchPolicyMergeTypesSettingsScopeArgs
                {
                    MatchType = "DefaultBranch",
                },
            },
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azuredevops.Project;
import com.pulumi.azuredevops.ProjectArgs;
import com.pulumi.azuredevops.Git;
import com.pulumi.azuredevops.GitArgs;
import com.pulumi.azuredevops.inputs.GitInitializationArgs;
import com.pulumi.azuredevops.BranchPolicyMergeTypes;
import com.pulumi.azuredevops.BranchPolicyMergeTypesArgs;
import com.pulumi.azuredevops.inputs.BranchPolicyMergeTypesSettingsArgs;
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 example = new Project("example", ProjectArgs.builder()
            .name("Example Project")
            .build());
        var exampleGit = new Git("exampleGit", GitArgs.builder()
            .projectId(example.id())
            .name("Example Repository")
            .initialization(GitInitializationArgs.builder()
                .initType("Clean")
                .build())
            .build());
        var exampleBranchPolicyMergeTypes = new BranchPolicyMergeTypes("exampleBranchPolicyMergeTypes", BranchPolicyMergeTypesArgs.builder()
            .projectId(example.id())
            .enabled(true)
            .blocking(true)
            .settings(BranchPolicyMergeTypesSettingsArgs.builder()
                .allowSquash(true)
                .allowRebaseAndFastForward(true)
                .allowBasicNoFastForward(true)
                .allowRebaseWithMerge(true)
                .scopes(                
                    BranchPolicyMergeTypesSettingsScopeArgs.builder()
                        .repositoryId(exampleGit.id())
                        .repositoryRef(exampleGit.defaultBranch())
                        .matchType("Exact")
                        .build(),
                    BranchPolicyMergeTypesSettingsScopeArgs.builder()
                        .repositoryId(null)
                        .repositoryRef("refs/heads/releases")
                        .matchType("Prefix")
                        .build(),
                    BranchPolicyMergeTypesSettingsScopeArgs.builder()
                        .matchType("DefaultBranch")
                        .build())
                .build())
            .build());
    }
}
resources:
  example:
    type: azuredevops:Project
    properties:
      name: Example Project
  exampleGit:
    type: azuredevops:Git
    name: example
    properties:
      projectId: ${example.id}
      name: Example Repository
      initialization:
        initType: Clean
  exampleBranchPolicyMergeTypes:
    type: azuredevops:BranchPolicyMergeTypes
    name: example
    properties:
      projectId: ${example.id}
      enabled: true
      blocking: true
      settings:
        allowSquash: true
        allowRebaseAndFastForward: true
        allowBasicNoFastForward: true
        allowRebaseWithMerge: true
        scopes:
          - repositoryId: ${exampleGit.id}
            repositoryRef: ${exampleGit.defaultBranch}
            matchType: Exact
          - repositoryId: null
            repositoryRef: refs/heads/releases
            matchType: Prefix
          - matchType: DefaultBranch
Relevant Links
Create BranchPolicyMergeTypes Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new BranchPolicyMergeTypes(name: string, args: BranchPolicyMergeTypesArgs, opts?: CustomResourceOptions);@overload
def BranchPolicyMergeTypes(resource_name: str,
                           args: BranchPolicyMergeTypesArgs,
                           opts: Optional[ResourceOptions] = None)
@overload
def BranchPolicyMergeTypes(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           project_id: Optional[str] = None,
                           settings: Optional[BranchPolicyMergeTypesSettingsArgs] = None,
                           blocking: Optional[bool] = None,
                           enabled: Optional[bool] = None)func NewBranchPolicyMergeTypes(ctx *Context, name string, args BranchPolicyMergeTypesArgs, opts ...ResourceOption) (*BranchPolicyMergeTypes, error)public BranchPolicyMergeTypes(string name, BranchPolicyMergeTypesArgs args, CustomResourceOptions? opts = null)
public BranchPolicyMergeTypes(String name, BranchPolicyMergeTypesArgs args)
public BranchPolicyMergeTypes(String name, BranchPolicyMergeTypesArgs args, CustomResourceOptions options)
type: azuredevops:BranchPolicyMergeTypes
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 BranchPolicyMergeTypesArgs
- 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 BranchPolicyMergeTypesArgs
- 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 BranchPolicyMergeTypesArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args BranchPolicyMergeTypesArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args BranchPolicyMergeTypesArgs
- 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 branchPolicyMergeTypesResource = new AzureDevOps.BranchPolicyMergeTypes("branchPolicyMergeTypesResource", new()
{
    ProjectId = "string",
    Settings = new AzureDevOps.Inputs.BranchPolicyMergeTypesSettingsArgs
    {
        Scopes = new[]
        {
            new AzureDevOps.Inputs.BranchPolicyMergeTypesSettingsScopeArgs
            {
                MatchType = "string",
                RepositoryId = "string",
                RepositoryRef = "string",
            },
        },
        AllowBasicNoFastForward = false,
        AllowRebaseAndFastForward = false,
        AllowRebaseWithMerge = false,
        AllowSquash = false,
    },
    Blocking = false,
    Enabled = false,
});
example, err := azuredevops.NewBranchPolicyMergeTypes(ctx, "branchPolicyMergeTypesResource", &azuredevops.BranchPolicyMergeTypesArgs{
	ProjectId: pulumi.String("string"),
	Settings: &azuredevops.BranchPolicyMergeTypesSettingsArgs{
		Scopes: azuredevops.BranchPolicyMergeTypesSettingsScopeArray{
			&azuredevops.BranchPolicyMergeTypesSettingsScopeArgs{
				MatchType:     pulumi.String("string"),
				RepositoryId:  pulumi.String("string"),
				RepositoryRef: pulumi.String("string"),
			},
		},
		AllowBasicNoFastForward:   pulumi.Bool(false),
		AllowRebaseAndFastForward: pulumi.Bool(false),
		AllowRebaseWithMerge:      pulumi.Bool(false),
		AllowSquash:               pulumi.Bool(false),
	},
	Blocking: pulumi.Bool(false),
	Enabled:  pulumi.Bool(false),
})
var branchPolicyMergeTypesResource = new BranchPolicyMergeTypes("branchPolicyMergeTypesResource", BranchPolicyMergeTypesArgs.builder()
    .projectId("string")
    .settings(BranchPolicyMergeTypesSettingsArgs.builder()
        .scopes(BranchPolicyMergeTypesSettingsScopeArgs.builder()
            .matchType("string")
            .repositoryId("string")
            .repositoryRef("string")
            .build())
        .allowBasicNoFastForward(false)
        .allowRebaseAndFastForward(false)
        .allowRebaseWithMerge(false)
        .allowSquash(false)
        .build())
    .blocking(false)
    .enabled(false)
    .build());
branch_policy_merge_types_resource = azuredevops.BranchPolicyMergeTypes("branchPolicyMergeTypesResource",
    project_id="string",
    settings={
        "scopes": [{
            "match_type": "string",
            "repository_id": "string",
            "repository_ref": "string",
        }],
        "allow_basic_no_fast_forward": False,
        "allow_rebase_and_fast_forward": False,
        "allow_rebase_with_merge": False,
        "allow_squash": False,
    },
    blocking=False,
    enabled=False)
const branchPolicyMergeTypesResource = new azuredevops.BranchPolicyMergeTypes("branchPolicyMergeTypesResource", {
    projectId: "string",
    settings: {
        scopes: [{
            matchType: "string",
            repositoryId: "string",
            repositoryRef: "string",
        }],
        allowBasicNoFastForward: false,
        allowRebaseAndFastForward: false,
        allowRebaseWithMerge: false,
        allowSquash: false,
    },
    blocking: false,
    enabled: false,
});
type: azuredevops:BranchPolicyMergeTypes
properties:
    blocking: false
    enabled: false
    projectId: string
    settings:
        allowBasicNoFastForward: false
        allowRebaseAndFastForward: false
        allowRebaseWithMerge: false
        allowSquash: false
        scopes:
            - matchType: string
              repositoryId: string
              repositoryRef: string
BranchPolicyMergeTypes 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 BranchPolicyMergeTypes resource accepts the following input properties:
- ProjectId string
- The ID of the project in which the policy will be created.
- Settings
Pulumi.Azure Dev Ops. Inputs. Branch Policy Merge Types Settings 
- A settingsblock as defined below. Configuration for the policy. This block must be defined exactly once.
- Blocking bool
- A flag indicating if the policy should be blocking. Defaults to true.
- Enabled bool
- A flag indicating if the policy should be enabled. Defaults to true.
- ProjectId string
- The ID of the project in which the policy will be created.
- Settings
BranchPolicy Merge Types Settings Args 
- A settingsblock as defined below. Configuration for the policy. This block must be defined exactly once.
- Blocking bool
- A flag indicating if the policy should be blocking. Defaults to true.
- Enabled bool
- A flag indicating if the policy should be enabled. Defaults to true.
- projectId String
- The ID of the project in which the policy will be created.
- settings
BranchPolicy Merge Types Settings 
- A settingsblock as defined below. Configuration for the policy. This block must be defined exactly once.
- blocking Boolean
- A flag indicating if the policy should be blocking. Defaults to true.
- enabled Boolean
- A flag indicating if the policy should be enabled. Defaults to true.
- projectId string
- The ID of the project in which the policy will be created.
- settings
BranchPolicy Merge Types Settings 
- A settingsblock as defined below. Configuration for the policy. This block must be defined exactly once.
- blocking boolean
- A flag indicating if the policy should be blocking. Defaults to true.
- enabled boolean
- A flag indicating if the policy should be enabled. Defaults to true.
- project_id str
- The ID of the project in which the policy will be created.
- settings
BranchPolicy Merge Types Settings Args 
- A settingsblock as defined below. Configuration for the policy. This block must be defined exactly once.
- blocking bool
- A flag indicating if the policy should be blocking. Defaults to true.
- enabled bool
- A flag indicating if the policy should be enabled. Defaults to true.
- projectId String
- The ID of the project in which the policy will be created.
- settings Property Map
- A settingsblock as defined below. Configuration for the policy. This block must be defined exactly once.
- blocking Boolean
- A flag indicating if the policy should be blocking. Defaults to true.
- enabled Boolean
- A flag indicating if the policy should be enabled. Defaults to true.
Outputs
All input properties are implicitly available as output properties. Additionally, the BranchPolicyMergeTypes 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 BranchPolicyMergeTypes Resource
Get an existing BranchPolicyMergeTypes 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?: BranchPolicyMergeTypesState, opts?: CustomResourceOptions): BranchPolicyMergeTypes@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        blocking: Optional[bool] = None,
        enabled: Optional[bool] = None,
        project_id: Optional[str] = None,
        settings: Optional[BranchPolicyMergeTypesSettingsArgs] = None) -> BranchPolicyMergeTypesfunc GetBranchPolicyMergeTypes(ctx *Context, name string, id IDInput, state *BranchPolicyMergeTypesState, opts ...ResourceOption) (*BranchPolicyMergeTypes, error)public static BranchPolicyMergeTypes Get(string name, Input<string> id, BranchPolicyMergeTypesState? state, CustomResourceOptions? opts = null)public static BranchPolicyMergeTypes get(String name, Output<String> id, BranchPolicyMergeTypesState state, CustomResourceOptions options)resources:  _:    type: azuredevops:BranchPolicyMergeTypes    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.
- Blocking bool
- A flag indicating if the policy should be blocking. Defaults to true.
- Enabled bool
- A flag indicating if the policy should be enabled. Defaults to true.
- ProjectId string
- The ID of the project in which the policy will be created.
- Settings
Pulumi.Azure Dev Ops. Inputs. Branch Policy Merge Types Settings 
- A settingsblock as defined below. Configuration for the policy. This block must be defined exactly once.
- Blocking bool
- A flag indicating if the policy should be blocking. Defaults to true.
- Enabled bool
- A flag indicating if the policy should be enabled. Defaults to true.
- ProjectId string
- The ID of the project in which the policy will be created.
- Settings
BranchPolicy Merge Types Settings Args 
- A settingsblock as defined below. Configuration for the policy. This block must be defined exactly once.
- blocking Boolean
- A flag indicating if the policy should be blocking. Defaults to true.
- enabled Boolean
- A flag indicating if the policy should be enabled. Defaults to true.
- projectId String
- The ID of the project in which the policy will be created.
- settings
BranchPolicy Merge Types Settings 
- A settingsblock as defined below. Configuration for the policy. This block must be defined exactly once.
- blocking boolean
- A flag indicating if the policy should be blocking. Defaults to true.
- enabled boolean
- A flag indicating if the policy should be enabled. Defaults to true.
- projectId string
- The ID of the project in which the policy will be created.
- settings
BranchPolicy Merge Types Settings 
- A settingsblock as defined below. Configuration for the policy. This block must be defined exactly once.
- blocking bool
- A flag indicating if the policy should be blocking. Defaults to true.
- enabled bool
- A flag indicating if the policy should be enabled. Defaults to true.
- project_id str
- The ID of the project in which the policy will be created.
- settings
BranchPolicy Merge Types Settings Args 
- A settingsblock as defined below. Configuration for the policy. This block must be defined exactly once.
- blocking Boolean
- A flag indicating if the policy should be blocking. Defaults to true.
- enabled Boolean
- A flag indicating if the policy should be enabled. Defaults to true.
- projectId String
- The ID of the project in which the policy will be created.
- settings Property Map
- A settingsblock as defined below. Configuration for the policy. This block must be defined exactly once.
Supporting Types
BranchPolicyMergeTypesSettings, BranchPolicyMergeTypesSettingsArgs          
- Scopes
List<Pulumi.Azure Dev Ops. Inputs. Branch Policy Merge Types Settings Scope> 
- A scopeblock as defined below. Controls which repositories and branches the policy will be enabled for. This block must be defined at least once.
- AllowBasic boolNo Fast Forward 
- Allow basic merge with no fast forward. Defaults to false.
- AllowRebase boolAnd Fast Forward 
- Allow rebase with fast forward. Defaults to false.
- AllowRebase boolWith Merge 
- Allow rebase with merge commit. Defaults to false.
- AllowSquash bool
- Allow squash merge. Defaults to false
- Scopes
[]BranchPolicy Merge Types Settings Scope 
- A scopeblock as defined below. Controls which repositories and branches the policy will be enabled for. This block must be defined at least once.
- AllowBasic boolNo Fast Forward 
- Allow basic merge with no fast forward. Defaults to false.
- AllowRebase boolAnd Fast Forward 
- Allow rebase with fast forward. Defaults to false.
- AllowRebase boolWith Merge 
- Allow rebase with merge commit. Defaults to false.
- AllowSquash bool
- Allow squash merge. Defaults to false
- scopes
List<BranchPolicy Merge Types Settings Scope> 
- A scopeblock as defined below. Controls which repositories and branches the policy will be enabled for. This block must be defined at least once.
- allowBasic BooleanNo Fast Forward 
- Allow basic merge with no fast forward. Defaults to false.
- allowRebase BooleanAnd Fast Forward 
- Allow rebase with fast forward. Defaults to false.
- allowRebase BooleanWith Merge 
- Allow rebase with merge commit. Defaults to false.
- allowSquash Boolean
- Allow squash merge. Defaults to false
- scopes
BranchPolicy Merge Types Settings Scope[] 
- A scopeblock as defined below. Controls which repositories and branches the policy will be enabled for. This block must be defined at least once.
- allowBasic booleanNo Fast Forward 
- Allow basic merge with no fast forward. Defaults to false.
- allowRebase booleanAnd Fast Forward 
- Allow rebase with fast forward. Defaults to false.
- allowRebase booleanWith Merge 
- Allow rebase with merge commit. Defaults to false.
- allowSquash boolean
- Allow squash merge. Defaults to false
- scopes
Sequence[BranchPolicy Merge Types Settings Scope] 
- A scopeblock as defined below. Controls which repositories and branches the policy will be enabled for. This block must be defined at least once.
- allow_basic_ boolno_ fast_ forward 
- Allow basic merge with no fast forward. Defaults to false.
- allow_rebase_ booland_ fast_ forward 
- Allow rebase with fast forward. Defaults to false.
- allow_rebase_ boolwith_ merge 
- Allow rebase with merge commit. Defaults to false.
- allow_squash bool
- Allow squash merge. Defaults to false
- scopes List<Property Map>
- A scopeblock as defined below. Controls which repositories and branches the policy will be enabled for. This block must be defined at least once.
- allowBasic BooleanNo Fast Forward 
- Allow basic merge with no fast forward. Defaults to false.
- allowRebase BooleanAnd Fast Forward 
- Allow rebase with fast forward. Defaults to false.
- allowRebase BooleanWith Merge 
- Allow rebase with merge commit. Defaults to false.
- allowSquash Boolean
- Allow squash merge. Defaults to false
BranchPolicyMergeTypesSettingsScope, BranchPolicyMergeTypesSettingsScopeArgs            
- MatchType string
- The match type to use when applying the policy. Supported values are Exact(default),PrefixorDefaultBranch.
- RepositoryId string
- The repository ID. Needed only if the scope of the policy will be limited to a single repository. If match_typeisDefaultBranch, this should not be defined.
- RepositoryRef string
- The ref pattern to use for the match when match_typeother thanDefaultBranch. Ifmatch_typeisExact, this should be a qualified ref such asrefs/heads/master. Ifmatch_typeisPrefix, this should be a ref path such asrefs/heads/releases.
- MatchType string
- The match type to use when applying the policy. Supported values are Exact(default),PrefixorDefaultBranch.
- RepositoryId string
- The repository ID. Needed only if the scope of the policy will be limited to a single repository. If match_typeisDefaultBranch, this should not be defined.
- RepositoryRef string
- The ref pattern to use for the match when match_typeother thanDefaultBranch. Ifmatch_typeisExact, this should be a qualified ref such asrefs/heads/master. Ifmatch_typeisPrefix, this should be a ref path such asrefs/heads/releases.
- matchType String
- The match type to use when applying the policy. Supported values are Exact(default),PrefixorDefaultBranch.
- repositoryId String
- The repository ID. Needed only if the scope of the policy will be limited to a single repository. If match_typeisDefaultBranch, this should not be defined.
- repositoryRef String
- The ref pattern to use for the match when match_typeother thanDefaultBranch. Ifmatch_typeisExact, this should be a qualified ref such asrefs/heads/master. Ifmatch_typeisPrefix, this should be a ref path such asrefs/heads/releases.
- matchType string
- The match type to use when applying the policy. Supported values are Exact(default),PrefixorDefaultBranch.
- repositoryId string
- The repository ID. Needed only if the scope of the policy will be limited to a single repository. If match_typeisDefaultBranch, this should not be defined.
- repositoryRef string
- The ref pattern to use for the match when match_typeother thanDefaultBranch. Ifmatch_typeisExact, this should be a qualified ref such asrefs/heads/master. Ifmatch_typeisPrefix, this should be a ref path such asrefs/heads/releases.
- match_type str
- The match type to use when applying the policy. Supported values are Exact(default),PrefixorDefaultBranch.
- repository_id str
- The repository ID. Needed only if the scope of the policy will be limited to a single repository. If match_typeisDefaultBranch, this should not be defined.
- repository_ref str
- The ref pattern to use for the match when match_typeother thanDefaultBranch. Ifmatch_typeisExact, this should be a qualified ref such asrefs/heads/master. Ifmatch_typeisPrefix, this should be a ref path such asrefs/heads/releases.
- matchType String
- The match type to use when applying the policy. Supported values are Exact(default),PrefixorDefaultBranch.
- repositoryId String
- The repository ID. Needed only if the scope of the policy will be limited to a single repository. If match_typeisDefaultBranch, this should not be defined.
- repositoryRef String
- The ref pattern to use for the match when match_typeother thanDefaultBranch. Ifmatch_typeisExact, this should be a qualified ref such asrefs/heads/master. Ifmatch_typeisPrefix, this should be a ref path such asrefs/heads/releases.
Import
Azure DevOps Branch Policies can be imported using the project ID and policy configuration ID:
$ pulumi import azuredevops:index/branchPolicyMergeTypes:BranchPolicyMergeTypes example 00000000-0000-0000-0000-000000000000/0
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure DevOps pulumi/pulumi-azuredevops
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the azuredevopsTerraform Provider.