Manages permissions for an Iteration (Sprint)
Permission for Iterations within Azure DevOps can be applied on two different levels.
Those levels are reflected by specifying (or omitting) values for the arguments project_id
and path
.
resource "azuredevops_project" "example" {
name = "Example Project"
work_item_template = "Agile"
version_control = "Git"
visibility = "private"
description = "Managed by Terraform"
}
data "azuredevops_group" "example-readers" {
project_id = azuredevops_project.example.id
name = "Readers"
}
resource "azuredevops_iteration_permissions" "example-root-permissions" {
project_id = azuredevops_project.example.id
principal = data.azuredevops_group.example-readers.id
permissions = {
CREATE_CHILDREN = "Deny"
GENERIC_READ = "NotSet"
DELETE = "Deny"
}
}
resource "azuredevops_iteration_permissions" "example-iteration-permissions" {
project_id = azuredevops_project.example.id
principal = data.azuredevops_group.example-readers.id
path = "Iteration 1"
permissions = {
CREATE_CHILDREN = "Allow"
GENERIC_READ = "NotSet"
DELETE = "Allow"
}
}
The following arguments are supported:
project_id
- (Required) The ID of the project to assign the permissions.principal
- (Required) The group principal to assign the permissions.permissions
- (Required) the permissions to assign. The following permissions are available.path
- (Optional) The name of the branch to assign the permissions. replace
- (Optional) Replace (true
) or merge (false
) the permissions. Default: true
Permission | Description |
---|---|
GENERIC_READ | View permissions for this node |
GENERIC_WRITE | Edit this node |
CREATE_CHILDREN | Create child nodes |
DELETE | Delete this node |
The resource does not support import.