Azure DevOps Provider
Installation
The Azure DevOps provider is available as a package in all Pulumi languages:
- JavaScript/TypeScript:
@pulumi/azuredevops - Python:
pulumi-azuredevops - Go:
github.com/pulumi/pulumi-azuredevops/sdk/v3/go/azuredevops - .NET:
Pulumi.Azuredevops - Java:
com.pulumi/azuredevops
Overview
The Azure DevOps provider can be used to configure Azure DevOps project in Microsoft Azure using Azure DevOps Service REST API
Use the navigation to the left to read about the available resources.
Interested in the provider’s latest features, or want to make sure you’re up to date? Check out the changelog for version information and release notes.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as azuredevops from "@pulumi/azuredevops";
const project = new azuredevops.Project("project", {
name: "Project Name",
description: "Project Description",
});
import pulumi
import pulumi_azuredevops as azuredevops
project = azuredevops.Project("project",
name="Project Name",
description="Project Description")
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AzureDevOps = Pulumi.AzureDevOps;
return await Deployment.RunAsync(() =>
{
var project = new AzureDevOps.Project("project", new()
{
Name = "Project Name",
Description = "Project Description",
});
});
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 {
_, err := azuredevops.NewProject(ctx, "project", &azuredevops.ProjectArgs{
Name: pulumi.String("Project Name"),
Description: pulumi.String("Project Description"),
})
if err != nil {
return err
}
return nil
})
}
resources:
project:
type: azuredevops:Project
properties:
name: Project Name
description: Project Description
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 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 project = new Project("project", ProjectArgs.builder()
.name("Project Name")
.description("Project Description")
.build());
}
}
Configuration Reference
The following configuration inputs are supported in the provider configuration:
orgServiceUrl- (Required) This is the Azure DevOps organization url. It can also be sourced from theAZDO_ORG_SERVICE_URLenvironment variable.personalAccessToken- This is the Azure DevOps organization personal access token. The account corresponding to the token will need “owner” privileges for this organization. It can also be sourced from theAZDO_PERSONAL_ACCESS_TOKENenvironment variable.clientId- The client id used when authenticating to a service principal or the principal id when authenticating with a user specified managed service identity. It can also be sourced from theARM_CLIENT_IDorAZURE_CLIENT_IDenvironment variable.clientIdFilePath- The path to a file containing a client id to authenticate. It can also be sourced from theARM_CLIENT_ID_FILE_PATHenvironment variable.tenantId- The tenant id used when authenticating to a service principal. It can also be sourced from theARM_TENANT_IDenvironment variable.auxiliaryTenantIds- List of auxiliary Tenant IDs required for multi-tenancy and cross-tenant scenarios. This can also be sourced from theARM_AUXILIARY_TENANT_IDSenvironment variable.clientSecret- The client secret used to authenticate to a service principal. It can also be sourced from theARM_CLIENT_SECRETenvironment variable.clientSecretPath- The path to a file containing a client secret to authenticate to a service principal. It can also be sourced from theARM_CLIENT_SECRET_PATHorARM_CLIENT_SECRET_FILE_PATHenvironment variable.clientCertificatePath- The path to a file containing a certificate to authenticate to a service principal, typically a .pfx file. It can also be sourced from theARM_CLIENT_CERTIFICATE_PATHenvironment variable.clientCertificate- A base64 encoded certificate to authentiate to a service principal. It can also be sourced from theARM_CLIENT_CERTIFICATEenvironment variable.clientCertificatePassword- This is the password associated with a certificate provided byclientCertificatePathorclientCertificate. It can also be sourced from theARM_CLIENT_CERTIFICATE_PASSWORDenvironment variable.oidcToken- An OIDC token to authenticate to a service principal. It can also be sourced from theARM_OIDC_TOKENenvironment variable.oidcTokenFilePath- The path to a file containing nn OIDC token to authenticate to a service principal. It can also be sourced from theAZDO_TOKEN_PATH, orAZURE_FEDERATED_TOKEN_FILEenvironment variable.oidcRequestToken- The bearer token for the request to the OIDC provider. For use when authenticating as a Service Principal using OpenID Connect. It can also be sourced from theARM_OIDC_REQUEST_TOKEN,ACTIONS_ID_TOKEN_REQUEST_TOKEN,SYSTEM_ACCESSTOKENenvironment variables.oidcRequestUrl- The URL for the OIDC provider from which to request an ID token. For use when authenticating as a Service Principal using OpenID Connect. It can also be sourced from theARM_OIDC_REQUEST_URL,ACTIONS_ID_TOKEN_REQUEST_URLorSYSTEM_OIDCREQUESTURIenvironment variables.oidcAzureServiceConnectionId- The Azure Pipelines Service Connection ID to use for authentication. This can also be sourced from theARM_ADO_PIPELINE_SERVICE_CONNECTION_ID,ARM_OIDC_AZURE_SERVICE_CONNECTION_ID, orAZURESUBSCRIPTION_SERVICE_CONNECTION_IDenvironment variables.useOidc- Boolean, enables OIDC auth methods. It can also be sourced from theARM_USE_OIDCenvironment variable.useMsi- Boolean, enables authentication with a Managed Service Identity in Azure. It can also be sourced from theARM_USE_MSIenvironment variable.useCli- Should Azure CLI be used for authentication? This can also be sourced from theARM_USE_CLIenvironment variable. Defaults totrue.
