Skip to content

Latest commit

 

History

History
104 lines (72 loc) · 3.14 KB

team.html.markdown

File metadata and controls

104 lines (72 loc) · 3.14 KB

*--- layout: "azuredevops" page_title: "AzureDevops: azuredevops_team" description: |- Manages a team within a project in a Azure DevOps organization.

azuredevops_team

Manages 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"
}

data "azuredevops_group" "example-project-readers" {
  project_id = azuredevops_project.example.id
  name       = "Readers"
}

resource "azuredevops_team" "example" {
  project_id = azuredevops_project.example.id
  name       = "Example Team"
  administrators = [
    data.azuredevops_group.example-project-contributors.descriptor
  ]
  members = [
    data.azuredevops_group.example-project-readers.descriptor
  ]
}

Argument Reference

The following arguments are supported:

  • project_id - (Required) The Project ID.

  • name - (Required) The name of the Team.


  • description- (Optional) The description of the Team.

  • administrators - (Optional) List of subject descriptors to define administrators 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.


  • members - (Optional) List of subject descriptors to define members of the team.

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

Attributes Reference

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

  • id - The ID of the Team.
  • descriptor - The descriptor of the Team.

Relevant Links

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • create - (Defaults to 10 minutes) Used when creating the Team.
  • read - (Defaults to 5 minute) Used when retrieving the Team.
  • update - (Defaults to 10 minutes) Used when updating the Team.
  • delete - (Defaults to 10 minutes) Used when deleting the Team.

Import

Azure DevOps teams can be imported using the complete resource id <project_id>/<team_id> e.g.

terraform import azuredevops_team.example 00000000-0000-0000-0000-000000000000/00000000-0000-0000-0000-000000000000

PAT Permissions Required

  • vso.project_manage: Grants the ability to create, read, update, and delete projects and teams.