layout | page_title | description |
---|---|---|
azuredevops |
AzureDevops: azuredevops_group_membership |
Manages group membership within Azure DevOps organization. |
Manages group membership within Azure DevOps.
resource "azuredevops_project" "project" {
project_name = "Test Project"
}
resource "azuredevops_user_entitlement" "user" {
principal_name = "[email protected]"
}
data "azuredevops_group" "group" {
project_id = azuredevops_project.project.id
name = "Build Administrators"
}
resource "azuredevops_group_membership" "membership" {
group = data.azuredevops_group.group.descriptor
members = [
azuredevops_user_entitlement.user.descriptor
]
}
The following arguments are supported:
group
- (Required) The descriptor of the group being managed.members
- (Required) A list of user or group descriptors that will become members of the group.
NOTE: It's possible to define group members both within the
azuredevops_group_membership resource
via the members block and by using theazuredevops_group
resource. However it's not possible to use both methods to manage group members, since there'll be conflicts.
mode
- (Optional) The mode how the resource manages group members.mode == add
: the resource will ensure that all specified members will be part of the referenced groupmode == overwrite
: the resource will replace all existing members with the members specified within themembers
block
NOTE: To clear all members from a group, specify an empty list of descriptors in the
members
attribute and set themode
member tooverwrite
.
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.
Not supported.
- Deployment Groups: Read & Manage