1. Packages
  2. Azure DevOps Provider
  3. API Docs
  4. BuildFolder
Azure DevOps v3.8.0 published on Monday, Mar 17, 2025 by Pulumi

azuredevops.BuildFolder

Explore with Pulumi AI

Manages a Build Folder.

Example Usage

import * as pulumi from "@pulumi/pulumi";
import * as azuredevops from "@pulumi/azuredevops";

const example = new azuredevops.Project("example", {
    name: "Example Project",
    visibility: "private",
    versionControl: "Git",
    workItemTemplate: "Agile",
});
const exampleBuildFolder = new azuredevops.BuildFolder("example", {
    projectId: example.id,
    path: "\\ExampleFolder",
    description: "ExampleFolder description",
});
Copy
import pulumi
import pulumi_azuredevops as azuredevops

example = azuredevops.Project("example",
    name="Example Project",
    visibility="private",
    version_control="Git",
    work_item_template="Agile")
example_build_folder = azuredevops.BuildFolder("example",
    project_id=example.id,
    path="\\ExampleFolder",
    description="ExampleFolder description")
Copy
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"),
			Visibility:       pulumi.String("private"),
			VersionControl:   pulumi.String("Git"),
			WorkItemTemplate: pulumi.String("Agile"),
		})
		if err != nil {
			return err
		}
		_, err = azuredevops.NewBuildFolder(ctx, "example", &azuredevops.BuildFolderArgs{
			ProjectId:   example.ID(),
			Path:        pulumi.String("\\ExampleFolder"),
			Description: pulumi.String("ExampleFolder description"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
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",
        Visibility = "private",
        VersionControl = "Git",
        WorkItemTemplate = "Agile",
    });

    var exampleBuildFolder = new AzureDevOps.BuildFolder("example", new()
    {
        ProjectId = example.Id,
        Path = "\\ExampleFolder",
        Description = "ExampleFolder description",
    });

});
Copy
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.BuildFolder;
import com.pulumi.azuredevops.BuildFolderArgs;
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")
            .visibility("private")
            .versionControl("Git")
            .workItemTemplate("Agile")
            .build());

        var exampleBuildFolder = new BuildFolder("exampleBuildFolder", BuildFolderArgs.builder()
            .projectId(example.id())
            .path("\\ExampleFolder")
            .description("ExampleFolder description")
            .build());

    }
}
Copy
resources:
  example:
    type: azuredevops:Project
    properties:
      name: Example Project
      visibility: private
      versionControl: Git
      workItemTemplate: Agile
  exampleBuildFolder:
    type: azuredevops:BuildFolder
    name: example
    properties:
      projectId: ${example.id}
      path: \ExampleFolder
      description: ExampleFolder description
Copy

Create BuildFolder Resource

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

Constructor syntax

new BuildFolder(name: string, args: BuildFolderArgs, opts?: CustomResourceOptions);
@overload
def BuildFolder(resource_name: str,
                args: BuildFolderArgs,
                opts: Optional[ResourceOptions] = None)

@overload
def BuildFolder(resource_name: str,
                opts: Optional[ResourceOptions] = None,
                path: Optional[str] = None,
                project_id: Optional[str] = None,
                description: Optional[str] = None)
func NewBuildFolder(ctx *Context, name string, args BuildFolderArgs, opts ...ResourceOption) (*BuildFolder, error)
public BuildFolder(string name, BuildFolderArgs args, CustomResourceOptions? opts = null)
public BuildFolder(String name, BuildFolderArgs args)
public BuildFolder(String name, BuildFolderArgs args, CustomResourceOptions options)
type: azuredevops:BuildFolder
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. BuildFolderArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. BuildFolderArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. BuildFolderArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. BuildFolderArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. BuildFolderArgs
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 buildFolderResource = new AzureDevOps.BuildFolder("buildFolderResource", new()
{
    Path = "string",
    ProjectId = "string",
    Description = "string",
});
Copy
example, err := azuredevops.NewBuildFolder(ctx, "buildFolderResource", &azuredevops.BuildFolderArgs{
	Path:        pulumi.String("string"),
	ProjectId:   pulumi.String("string"),
	Description: pulumi.String("string"),
})
Copy
var buildFolderResource = new BuildFolder("buildFolderResource", BuildFolderArgs.builder()
    .path("string")
    .projectId("string")
    .description("string")
    .build());
Copy
build_folder_resource = azuredevops.BuildFolder("buildFolderResource",
    path="string",
    project_id="string",
    description="string")
Copy
const buildFolderResource = new azuredevops.BuildFolder("buildFolderResource", {
    path: "string",
    projectId: "string",
    description: "string",
});
Copy
type: azuredevops:BuildFolder
properties:
    description: string
    path: string
    projectId: string
Copy

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

Path This property is required. string
The folder path.
ProjectId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the project in which the folder will be created.
Description string
Folder Description.
Path This property is required. string
The folder path.
ProjectId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the project in which the folder will be created.
Description string
Folder Description.
path This property is required. String
The folder path.
projectId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the project in which the folder will be created.
description String
Folder Description.
path This property is required. string
The folder path.
projectId
This property is required.
Changes to this property will trigger replacement.
string
The ID of the project in which the folder will be created.
description string
Folder Description.
path This property is required. str
The folder path.
project_id
This property is required.
Changes to this property will trigger replacement.
str
The ID of the project in which the folder will be created.
description str
Folder Description.
path This property is required. String
The folder path.
projectId
This property is required.
Changes to this property will trigger replacement.
String
The ID of the project in which the folder will be created.
description String
Folder Description.

Outputs

All input properties are implicitly available as output properties. Additionally, the BuildFolder 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 BuildFolder Resource

Get an existing BuildFolder 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?: BuildFolderState, opts?: CustomResourceOptions): BuildFolder
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        description: Optional[str] = None,
        path: Optional[str] = None,
        project_id: Optional[str] = None) -> BuildFolder
func GetBuildFolder(ctx *Context, name string, id IDInput, state *BuildFolderState, opts ...ResourceOption) (*BuildFolder, error)
public static BuildFolder Get(string name, Input<string> id, BuildFolderState? state, CustomResourceOptions? opts = null)
public static BuildFolder get(String name, Output<String> id, BuildFolderState state, CustomResourceOptions options)
resources:  _:    type: azuredevops:BuildFolder    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
Description string
Folder Description.
Path string
The folder path.
ProjectId Changes to this property will trigger replacement. string
The ID of the project in which the folder will be created.
Description string
Folder Description.
Path string
The folder path.
ProjectId Changes to this property will trigger replacement. string
The ID of the project in which the folder will be created.
description String
Folder Description.
path String
The folder path.
projectId Changes to this property will trigger replacement. String
The ID of the project in which the folder will be created.
description string
Folder Description.
path string
The folder path.
projectId Changes to this property will trigger replacement. string
The ID of the project in which the folder will be created.
description str
Folder Description.
path str
The folder path.
project_id Changes to this property will trigger replacement. str
The ID of the project in which the folder will be created.
description String
Folder Description.
path String
The folder path.
projectId Changes to this property will trigger replacement. String
The ID of the project in which the folder will be created.

Import

Build Folders can be imported using the project name/path or project id/path, e.g.

$ pulumi import azuredevops:index/buildFolder:BuildFolder example "Example Project/\\ExampleFolder"
Copy

or

$ pulumi import azuredevops:index/buildFolder:BuildFolder example 00000000-0000-0000-0000-000000000000/\\ExampleFolder
Copy

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 azuredevops Terraform Provider.