Skip to content

Latest commit

 

History

History
75 lines (55 loc) · 2.51 KB

team_administrators.html.markdown

File metadata and controls

75 lines (55 loc) · 2.51 KB
layout page_title description
azuredevops
AzureDevops: azuredevops_team_administrators
Manages administrators of a team within a project in a Azure DevOps organization.

azuredevops_team_administrators

Manages administrators of a team within a project in a Azure DevOps organization.

Example Usage

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

data "azuredevops_group" "example-project-contributors" {
  project_id = azuredevops_project.example.id
  name       = "Contributors"
}

resource "azuredevops_team" "example" {
  project_id = azuredevops_project.example.id
  name       = "${azuredevops_project.example.name} Team 2"
}

resource "azuredevops_team_administrators" "example-team-administrators" {
  project_id = azuredevops_team.example.project_id
  team_id    = azuredevops_team.example.id
  mode       = "overwrite"
  administrators = [
    data.azuredevops_group.example-project-contributors.descriptor
  ]
}

Argument Reference

The following arguments are supported:

  • project_id - (Required) The Project ID.

  • team_id - (Required) The ID of the Team.

  • administrators - (Required) List of subject descriptors to define adminitrators of the team.

    NOTE: It's possible to define team administrators both within the azuredevops_team resource via the administrators block and by using the azuredevops_team_administrators resource. However it's not possible to use both methods to manage team administrators, since there'll be conflicts.

  • mode - (Optional) The mode how the resource manages team administrators.

    • mode == add: the resource will ensure that all specified administrators will be part of the referenced team
    • mode == overwrite: the resource will replace all existing administrators with the administrators specified within the administrators block

Attributes Reference

In addition to all arguments above, the following attributes are exported:

  • id - A random ID for this resource. There is no "natural" ID, so a random one is assigned.

Relevant Links

Import

The resource does not support import.

PAT Permissions Required

  • vso.project_write: Grants the ability to read and update projects and teams.