Manages members of 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-readers" {
project_id = azuredevops_project.example.id
name = "Readers"
}
resource "azuredevops_team" "example" {
project_id = azuredevops_project.example.id
name = "${azuredevops_project.example.name} Team 2"
}
resource "azuredevops_team_members" "example-team-members" {
project_id = azuredevops_team.example.project_id
team_id = azuredevops_team.example.id
mode = "overwrite"
members = [
data.azuredevops_group.example-project-readers.descriptor
]
}
The following arguments are supported:
project_id
- (Required) The Project ID.team_id
- (Required) The ID of the Team.members
- (Required) 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.
mode
- (Optional) The mode how the resource manages team members.
mode == add
: the resource will ensure that all specified members will be part of the referenced teammode == overwrite
: the resource will replace all existing members with the members specified within the members
blockIn 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.The resource does not support import.