Share via


Microsoft.DevOps pipelines

Bicep resource definition

The pipelines resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.DevOps/pipelines resource, add the following Bicep to your template.

resource symbolicname 'Microsoft.DevOps/pipelines@2020-07-13-preview' = {
  location: 'string'
  name: 'string'
  properties: {
    bootstrapConfiguration: {
      sourceRepository: {
        authorization: {
          authorizationType: 'string'
          parameters: {
            {customized property}: 'string'
          }
        }
        defaultBranch: 'string'
        id: 'string'
        properties: {
          {customized property}: 'string'
        }
        repositoryType: 'string'
      }
      template: {
        id: 'string'
        parameters: {
          {customized property}: 'string'
        }
      }
    }
    pipelineType: 'string'
    // For remaining properties, see PipelineProperties objects
  }
  tags: {
    {customized property}: 'string'
  }
}

PipelineProperties objects

Set the pipelineType property to specify the type of object.

For azurePipeline, use:

{
  organization: {
    name: 'string'
  }
  pipelineType: 'azurePipeline'
  project: {
    name: 'string'
  }
}

For githubWorkflow, use:

{
  pipelineType: 'githubWorkflow'
  repository: {
    authorization: {
      authorizationType: 'string'
      parameters: {
        {customized property}: 'string'
      }
    }
    defaultBranch: 'string'
    id: 'string'
    properties: {
      {customized property}: 'string'
    }
    repositoryType: 'string'
  }
}

Property Values

Microsoft.DevOps/pipelines

Name Description Value
location Resource Location string
name The resource name string (required)
properties Custom properties of the Pipeline. PipelineProperties (required)
tags Resource tags Dictionary of tag names and values. See Tags in templates

Authorization

Name Description Value
authorizationType Type of authorization. 'personalAccessToken' (required)
parameters Authorization parameters corresponding to the authorization type. AuthorizationParameters

AuthorizationParameters

Name Description Value

AzurePipelineProperties

Name Description Value
organization Reference to the Azure DevOps Organization containing the Pipeline. Required for 'azurePipeline' pipeline type. OrganizationReference (required)
pipelineType Specifies which CI/CD provider to use. Valid options are 'azurePipeline', 'githubWorkflow'. 'azurePipeline' (required)
project Reference to the Azure DevOps Project containing the Pipeline. Required for 'azurePipeline' pipeline type. ProjectReference (required)

BootstrapConfiguration

Name Description Value
sourceRepository Repository containing the source code for the pipeline. Currently only 'azurePipeline' pipeline type supports this. CodeRepository
template Template used to bootstrap the pipeline. PipelineTemplate (required)

CodeRepository

Name Description Value
authorization Authorization info to access the code repository. Authorization
defaultBranch Default branch used to configure Continuous Integration (CI) in the pipeline. string (required)
id Unique immutable identifier of the code repository. string (required)
properties Repository-specific properties. CodeRepositoryProperties
repositoryType Type of code repository. 'gitHub'
'vstsGit' (required)

CodeRepositoryProperties

Name Description Value

GithubWorkflowProperties

Name Description Value
pipelineType Specifies which CI/CD provider to use. Valid options are 'azurePipeline', 'githubWorkflow'. 'githubWorkflow' (required)
repository Contains the specifications of the repository to be created for generating the workflow. Required for 'githubWorkflow' pipeline type. CodeRepository (required)

OrganizationReference

Name Description Value
name Name of the Azure DevOps Organization. string (required)

PipelineProperties

Name Description Value
bootstrapConfiguration Configuration used to bootstrap the Pipeline. BootstrapConfiguration (required)
pipelineType Set to 'azurePipeline' for type AzurePipelineProperties. Set to 'githubWorkflow' for type GithubWorkflowProperties. 'azurePipeline'
'githubWorkflow' (required)

PipelineTemplate

Name Description Value
id Unique identifier of the pipeline template. string (required)
parameters Dictionary of input parameters used in the pipeline template. PipelineTemplateParameters

PipelineTemplateParameters

Name Description Value

ProjectReference

Name Description Value
name Name of the Azure DevOps Project. string (required)

ResourceTags

Name Description Value

ARM template resource definition

The pipelines resource type can be deployed with operations that target:

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.DevOps/pipelines resource, add the following JSON to your template.

{
  "type": "Microsoft.DevOps/pipelines",
  "apiVersion": "2020-07-13-preview",
  "name": "string",
  "location": "string",
  "properties": {
    "bootstrapConfiguration": {
      "sourceRepository": {
        "authorization": {
          "authorizationType": "string",
          "parameters": {
            "{customized property}": "string"
          }
        },
        "defaultBranch": "string",
        "id": "string",
        "properties": {
          "{customized property}": "string"
        },
        "repositoryType": "string"
      },
      "template": {
        "id": "string",
        "parameters": {
          "{customized property}": "string"
        }
      }
    },
    "pipelineType": "string"
    // For remaining properties, see PipelineProperties objects
  },
  "tags": {
    "{customized property}": "string"
  }
}

PipelineProperties objects

Set the pipelineType property to specify the type of object.

For azurePipeline, use:

{
  "organization": {
    "name": "string"
  },
  "pipelineType": "azurePipeline",
  "project": {
    "name": "string"
  }
}

For githubWorkflow, use:

{
  "pipelineType": "githubWorkflow",
  "repository": {
    "authorization": {
      "authorizationType": "string",
      "parameters": {
        "{customized property}": "string"
      }
    },
    "defaultBranch": "string",
    "id": "string",
    "properties": {
      "{customized property}": "string"
    },
    "repositoryType": "string"
  }
}

Property Values

Microsoft.DevOps/pipelines

Name Description Value
apiVersion The api version '2020-07-13-preview'
location Resource Location string
name The resource name string (required)
properties Custom properties of the Pipeline. PipelineProperties (required)
tags Resource tags Dictionary of tag names and values. See Tags in templates
type The resource type 'Microsoft.DevOps/pipelines'

Authorization

Name Description Value
authorizationType Type of authorization. 'personalAccessToken' (required)
parameters Authorization parameters corresponding to the authorization type. AuthorizationParameters

AuthorizationParameters

Name Description Value

AzurePipelineProperties

Name Description Value
organization Reference to the Azure DevOps Organization containing the Pipeline. Required for 'azurePipeline' pipeline type. OrganizationReference (required)
pipelineType Specifies which CI/CD provider to use. Valid options are 'azurePipeline', 'githubWorkflow'. 'azurePipeline' (required)
project Reference to the Azure DevOps Project containing the Pipeline. Required for 'azurePipeline' pipeline type. ProjectReference (required)

BootstrapConfiguration

Name Description Value
sourceRepository Repository containing the source code for the pipeline. Currently only 'azurePipeline' pipeline type supports this. CodeRepository
template Template used to bootstrap the pipeline. PipelineTemplate (required)

CodeRepository

Name Description Value
authorization Authorization info to access the code repository. Authorization
defaultBranch Default branch used to configure Continuous Integration (CI) in the pipeline. string (required)
id Unique immutable identifier of the code repository. string (required)
properties Repository-specific properties. CodeRepositoryProperties
repositoryType Type of code repository. 'gitHub'
'vstsGit' (required)

CodeRepositoryProperties

Name Description Value

GithubWorkflowProperties

Name Description Value
pipelineType Specifies which CI/CD provider to use. Valid options are 'azurePipeline', 'githubWorkflow'. 'githubWorkflow' (required)
repository Contains the specifications of the repository to be created for generating the workflow. Required for 'githubWorkflow' pipeline type. CodeRepository (required)

OrganizationReference

Name Description Value
name Name of the Azure DevOps Organization. string (required)

PipelineProperties

Name Description Value
bootstrapConfiguration Configuration used to bootstrap the Pipeline. BootstrapConfiguration (required)
pipelineType Set to 'azurePipeline' for type AzurePipelineProperties. Set to 'githubWorkflow' for type GithubWorkflowProperties. 'azurePipeline'
'githubWorkflow' (required)

PipelineTemplate

Name Description Value
id Unique identifier of the pipeline template. string (required)
parameters Dictionary of input parameters used in the pipeline template. PipelineTemplateParameters

PipelineTemplateParameters

Name Description Value

ProjectReference

Name Description Value
name Name of the Azure DevOps Project. string (required)

ResourceTags

Name Description Value

Usage Examples

Terraform (AzAPI provider) resource definition

The pipelines resource type can be deployed with operations that target:

  • Resource groups

For a list of changed properties in each API version, see change log.

Resource format

To create a Microsoft.DevOps/pipelines resource, add the following Terraform to your template.

resource "azapi_resource" "symbolicname" {
  type = "Microsoft.DevOps/pipelines@2020-07-13-preview"
  name = "string"
  parent_id = "string"
  location = "string"
  tags = {
    {customized property} = "string"
  }
  body = {
    properties = {
      bootstrapConfiguration = {
        sourceRepository = {
          authorization = {
            authorizationType = "string"
            parameters = {
              {customized property} = "string"
            }
          }
          defaultBranch = "string"
          id = "string"
          properties = {
            {customized property} = "string"
          }
          repositoryType = "string"
        }
        template = {
          id = "string"
          parameters = {
            {customized property} = "string"
          }
        }
      }
      pipelineType = "string"
      // For remaining properties, see PipelineProperties objects
    }
  }
}

PipelineProperties objects

Set the pipelineType property to specify the type of object.

For azurePipeline, use:

{
  organization = {
    name = "string"
  }
  pipelineType = "azurePipeline"
  project = {
    name = "string"
  }
}

For githubWorkflow, use:

{
  pipelineType = "githubWorkflow"
  repository = {
    authorization = {
      authorizationType = "string"
      parameters = {
        {customized property} = "string"
      }
    }
    defaultBranch = "string"
    id = "string"
    properties = {
      {customized property} = "string"
    }
    repositoryType = "string"
  }
}

Property Values

Microsoft.DevOps/pipelines

Name Description Value
location Resource Location string
name The resource name string (required)
properties Custom properties of the Pipeline. PipelineProperties (required)
tags Resource tags Dictionary of tag names and values.
type The resource type "Microsoft.DevOps/pipelines@2020-07-13-preview"

Authorization

Name Description Value
authorizationType Type of authorization. 'personalAccessToken' (required)
parameters Authorization parameters corresponding to the authorization type. AuthorizationParameters

AuthorizationParameters

Name Description Value

AzurePipelineProperties

Name Description Value
organization Reference to the Azure DevOps Organization containing the Pipeline. Required for 'azurePipeline' pipeline type. OrganizationReference (required)
pipelineType Specifies which CI/CD provider to use. Valid options are 'azurePipeline', 'githubWorkflow'. 'azurePipeline' (required)
project Reference to the Azure DevOps Project containing the Pipeline. Required for 'azurePipeline' pipeline type. ProjectReference (required)

BootstrapConfiguration

Name Description Value
sourceRepository Repository containing the source code for the pipeline. Currently only 'azurePipeline' pipeline type supports this. CodeRepository
template Template used to bootstrap the pipeline. PipelineTemplate (required)

CodeRepository

Name Description Value
authorization Authorization info to access the code repository. Authorization
defaultBranch Default branch used to configure Continuous Integration (CI) in the pipeline. string (required)
id Unique immutable identifier of the code repository. string (required)
properties Repository-specific properties. CodeRepositoryProperties
repositoryType Type of code repository. 'gitHub'
'vstsGit' (required)

CodeRepositoryProperties

Name Description Value

GithubWorkflowProperties

Name Description Value
pipelineType Specifies which CI/CD provider to use. Valid options are 'azurePipeline', 'githubWorkflow'. 'githubWorkflow' (required)
repository Contains the specifications of the repository to be created for generating the workflow. Required for 'githubWorkflow' pipeline type. CodeRepository (required)

OrganizationReference

Name Description Value
name Name of the Azure DevOps Organization. string (required)

PipelineProperties

Name Description Value
bootstrapConfiguration Configuration used to bootstrap the Pipeline. BootstrapConfiguration (required)
pipelineType Set to 'azurePipeline' for type AzurePipelineProperties. Set to 'githubWorkflow' for type GithubWorkflowProperties. 'azurePipeline'
'githubWorkflow' (required)

PipelineTemplate

Name Description Value
id Unique identifier of the pipeline template. string (required)
parameters Dictionary of input parameters used in the pipeline template. PipelineTemplateParameters

PipelineTemplateParameters

Name Description Value

ProjectReference

Name Description Value
name Name of the Azure DevOps Project. string (required)

ResourceTags

Name Description Value