azuredevops_pipeline_authorization

Manage pipeline access permissions to resources.

Example Usage

Authorization for all pipelines

resource "azuredevops_project" "example" {
  name               = "Example Project"
  visibility         = "private"
  version_control    = "Git"
  work_item_template = "Agile"
  description        = "Managed by Terraform"
}

resource "azuredevops_agent_pool" "example" {
  name           = "Example Pool"
  auto_provision = false
  auto_update    = false
}

resource "azuredevops_agent_queue" "example" {
  project_id    = azuredevops_project.example.id
  agent_pool_id = azuredevops_agent_pool.example.id
}

resource "azuredevops_pipeline_authorization" "example" {
  project_id  = azuredevops_project.example.id
  resource_id = azuredevops_agent_queue.example.id
  type        = "queue"
}

Authorization for specific pipeline

resource "azuredevops_project" "example" {
  name               = "Example Project"
  visibility         = "private"
  version_control    = "Git"
  work_item_template = "Agile"
  description        = "Managed by Terraform"
}

resource "azuredevops_agent_pool" "example" {
  name           = "Example Pool"
  auto_provision = false
  auto_update    = false
}

resource "azuredevops_agent_queue" "example" {
  project_id    = azuredevops_project.example.id
  agent_pool_id = azuredevops_agent_pool.example.id
}

data "azuredevops_git_repository" "example" {
  project_id = azuredevops_project.example.id
  name       = "Example Project"
}

resource "azuredevops_build_definition" "example" {
  project_id = azuredevops_project.example.id
  name       = "Example Pipeline"

  repository {
    repo_type = "TfsGit"
    repo_id   = data.azuredevops_git_repository.example.id
    yml_path  = "azure-pipelines.yml"
  }
}

resource "azuredevops_pipeline_authorization" "example" {
  project_id  = azuredevops_project.example.id
  resource_id = azuredevops_agent_queue.example.id
  type        = "queue"
  pipeline_id = azuredevops_build_definition.example.id
}

Argument Reference

The following arguments are supported:


Attributes Reference

No attributes are exported