1. Packages
  2. AzureDevOps
  3. API Docs
  4. ProjectFeatures
Azure DevOps v3.0.0 published on Friday, Mar 15, 2024 by Pulumi

azuredevops.ProjectFeatures

Explore with Pulumi AI

azuredevops logo
Azure DevOps v3.0.0 published on Friday, Mar 15, 2024 by Pulumi

    Manages features for Azure DevOps projects

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as azuredevops from "@pulumi/azuredevops";
    
    const example = new azuredevops.Project("example", {
        visibility: "private",
        versionControl: "Git",
        workItemTemplate: "Agile",
        description: "Managed by Terraform",
    });
    const example_features = new azuredevops.ProjectFeatures("example-features", {
        projectId: example.id,
        features: {
            testplans: "disabled",
            artifacts: "enabled",
        },
    });
    
    import pulumi
    import pulumi_azuredevops as azuredevops
    
    example = azuredevops.Project("example",
        visibility="private",
        version_control="Git",
        work_item_template="Agile",
        description="Managed by Terraform")
    example_features = azuredevops.ProjectFeatures("example-features",
        project_id=example.id,
        features={
            "testplans": "disabled",
            "artifacts": "enabled",
        })
    
    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{
    			Visibility:       pulumi.String("private"),
    			VersionControl:   pulumi.String("Git"),
    			WorkItemTemplate: pulumi.String("Agile"),
    			Description:      pulumi.String("Managed by Terraform"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = azuredevops.NewProjectFeatures(ctx, "example-features", &azuredevops.ProjectFeaturesArgs{
    			ProjectId: example.ID(),
    			Features: pulumi.StringMap{
    				"testplans": pulumi.String("disabled"),
    				"artifacts": pulumi.String("enabled"),
    			},
    		})
    		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()
        {
            Visibility = "private",
            VersionControl = "Git",
            WorkItemTemplate = "Agile",
            Description = "Managed by Terraform",
        });
    
        var example_features = new AzureDevOps.ProjectFeatures("example-features", new()
        {
            ProjectId = example.Id,
            Features = 
            {
                { "testplans", "disabled" },
                { "artifacts", "enabled" },
            },
        });
    
    });
    
    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.ProjectFeatures;
    import com.pulumi.azuredevops.ProjectFeaturesArgs;
    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()        
                .visibility("private")
                .versionControl("Git")
                .workItemTemplate("Agile")
                .description("Managed by Terraform")
                .build());
    
            var example_features = new ProjectFeatures("example-features", ProjectFeaturesArgs.builder()        
                .projectId(example.id())
                .features(Map.ofEntries(
                    Map.entry("testplans", "disabled"),
                    Map.entry("artifacts", "enabled")
                ))
                .build());
    
        }
    }
    
    resources:
      example:
        type: azuredevops:Project
        properties:
          visibility: private
          versionControl: Git
          workItemTemplate: Agile
          description: Managed by Terraform
      example-features:
        type: azuredevops:ProjectFeatures
        properties:
          projectId: ${example.id}
          features:
            testplans: disabled
            artifacts: enabled
    

    No official documentation available

    PAT Permissions Required

    • Project & Team: Read, Write, & Manage

    Create ProjectFeatures Resource

    new ProjectFeatures(name: string, args: ProjectFeaturesArgs, opts?: CustomResourceOptions);
    @overload
    def ProjectFeatures(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        features: Optional[Mapping[str, str]] = None,
                        project_id: Optional[str] = None)
    @overload
    def ProjectFeatures(resource_name: str,
                        args: ProjectFeaturesArgs,
                        opts: Optional[ResourceOptions] = None)
    func NewProjectFeatures(ctx *Context, name string, args ProjectFeaturesArgs, opts ...ResourceOption) (*ProjectFeatures, error)
    public ProjectFeatures(string name, ProjectFeaturesArgs args, CustomResourceOptions? opts = null)
    public ProjectFeatures(String name, ProjectFeaturesArgs args)
    public ProjectFeatures(String name, ProjectFeaturesArgs args, CustomResourceOptions options)
    
    type: azuredevops:ProjectFeatures
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args ProjectFeaturesArgs
    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 ProjectFeaturesArgs
    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 ProjectFeaturesArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ProjectFeaturesArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ProjectFeaturesArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    ProjectFeatures Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The ProjectFeatures resource accepts the following input properties:

    Features Dictionary<string, string>

    Defines the status (enabled, disabled) of the project features.
    Valid features boards, repositories, pipelines, testplans, artifacts

    NOTE: It's possible to define project features both within the azuredevops.ProjectFeatures resource and via the features block by using the azuredevops.Project resource. However it's not possible to use both methods to manage features, since there'll be conflicts.

    ProjectId string
    Features map[string]string

    Defines the status (enabled, disabled) of the project features.
    Valid features boards, repositories, pipelines, testplans, artifacts

    NOTE: It's possible to define project features both within the azuredevops.ProjectFeatures resource and via the features block by using the azuredevops.Project resource. However it's not possible to use both methods to manage features, since there'll be conflicts.

    ProjectId string
    features Map<String,String>

    Defines the status (enabled, disabled) of the project features.
    Valid features boards, repositories, pipelines, testplans, artifacts

    NOTE: It's possible to define project features both within the azuredevops.ProjectFeatures resource and via the features block by using the azuredevops.Project resource. However it's not possible to use both methods to manage features, since there'll be conflicts.

    projectId String
    features {[key: string]: string}

    Defines the status (enabled, disabled) of the project features.
    Valid features boards, repositories, pipelines, testplans, artifacts

    NOTE: It's possible to define project features both within the azuredevops.ProjectFeatures resource and via the features block by using the azuredevops.Project resource. However it's not possible to use both methods to manage features, since there'll be conflicts.

    projectId string
    features Mapping[str, str]

    Defines the status (enabled, disabled) of the project features.
    Valid features boards, repositories, pipelines, testplans, artifacts

    NOTE: It's possible to define project features both within the azuredevops.ProjectFeatures resource and via the features block by using the azuredevops.Project resource. However it's not possible to use both methods to manage features, since there'll be conflicts.

    project_id str
    features Map<String>

    Defines the status (enabled, disabled) of the project features.
    Valid features boards, repositories, pipelines, testplans, artifacts

    NOTE: It's possible to define project features both within the azuredevops.ProjectFeatures resource and via the features block by using the azuredevops.Project resource. However it's not possible to use both methods to manage features, since there'll be conflicts.

    projectId String

    Outputs

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

    Get an existing ProjectFeatures 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?: ProjectFeaturesState, opts?: CustomResourceOptions): ProjectFeatures
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            features: Optional[Mapping[str, str]] = None,
            project_id: Optional[str] = None) -> ProjectFeatures
    func GetProjectFeatures(ctx *Context, name string, id IDInput, state *ProjectFeaturesState, opts ...ResourceOption) (*ProjectFeatures, error)
    public static ProjectFeatures Get(string name, Input<string> id, ProjectFeaturesState? state, CustomResourceOptions? opts = null)
    public static ProjectFeatures get(String name, Output<String> id, ProjectFeaturesState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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:
    Features Dictionary<string, string>

    Defines the status (enabled, disabled) of the project features.
    Valid features boards, repositories, pipelines, testplans, artifacts

    NOTE: It's possible to define project features both within the azuredevops.ProjectFeatures resource and via the features block by using the azuredevops.Project resource. However it's not possible to use both methods to manage features, since there'll be conflicts.

    ProjectId string
    Features map[string]string

    Defines the status (enabled, disabled) of the project features.
    Valid features boards, repositories, pipelines, testplans, artifacts

    NOTE: It's possible to define project features both within the azuredevops.ProjectFeatures resource and via the features block by using the azuredevops.Project resource. However it's not possible to use both methods to manage features, since there'll be conflicts.

    ProjectId string
    features Map<String,String>

    Defines the status (enabled, disabled) of the project features.
    Valid features boards, repositories, pipelines, testplans, artifacts

    NOTE: It's possible to define project features both within the azuredevops.ProjectFeatures resource and via the features block by using the azuredevops.Project resource. However it's not possible to use both methods to manage features, since there'll be conflicts.

    projectId String
    features {[key: string]: string}

    Defines the status (enabled, disabled) of the project features.
    Valid features boards, repositories, pipelines, testplans, artifacts

    NOTE: It's possible to define project features both within the azuredevops.ProjectFeatures resource and via the features block by using the azuredevops.Project resource. However it's not possible to use both methods to manage features, since there'll be conflicts.

    projectId string
    features Mapping[str, str]

    Defines the status (enabled, disabled) of the project features.
    Valid features boards, repositories, pipelines, testplans, artifacts

    NOTE: It's possible to define project features both within the azuredevops.ProjectFeatures resource and via the features block by using the azuredevops.Project resource. However it's not possible to use both methods to manage features, since there'll be conflicts.

    project_id str
    features Map<String>

    Defines the status (enabled, disabled) of the project features.
    Valid features boards, repositories, pipelines, testplans, artifacts

    NOTE: It's possible to define project features both within the azuredevops.ProjectFeatures resource and via the features block by using the azuredevops.Project resource. However it's not possible to use both methods to manage features, since there'll be conflicts.

    projectId String

    Import

    Azure DevOps feature settings can be imported using the project id, e.g.

    $ pulumi import azuredevops:index/projectFeatures:ProjectFeatures example 00000000-0000-0000-0000-000000000000
    

    Package Details

    Repository
    Azure DevOps pulumi/pulumi-azuredevops
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the azuredevops Terraform Provider.
    azuredevops logo
    Azure DevOps v3.0.0 published on Friday, Mar 15, 2024 by Pulumi