*--- layout: "azuredevops" page_title: "AzureDevops: azuredevops_team" description: |- Manages a team within a project in a Azure DevOps organization.
Manages a team within a project in a Azure DevOps organization.
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
]
}
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 theadministrators
block and by using theazuredevops_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 themembers
block and by using theazuredevops_team_members
resource. However it's not possible to use both methods to manage team members, since there'll be conflicts.
In addition to all arguments above, the following attributes are exported:
id
- The ID of the Team.descriptor
- The descriptor of the Team.
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.
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
- vso.project_manage: Grants the ability to create, read, update, and delete projects and teams.