layout | page_title | description |
---|---|---|
azuredevops |
AzureDevops: azuredevops_team_administrators |
Manages administrators of a team within a project in a Azure DevOps organization. |
Manages administrators 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-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
]
}
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 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. -
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 teammode == overwrite
: the resource will replace all existing administrators with the administrators specified within theadministrators
block
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.
The resource does not support import.
- vso.project_write: Grants the ability to read and update projects and teams.