Skip to content

Latest commit

 

History

History
76 lines (51 loc) · 2.68 KB

group_membership.html.markdown

File metadata and controls

76 lines (51 loc) · 2.68 KB
layout page_title description
azuredevops
AzureDevops: azuredevops_group_membership
Manages group membership within Azure DevOps organization.

azuredevops_group_membership

Manages group membership within Azure DevOps.

Example Usage

resource "azuredevops_project" "example" {
  name = "Example Project"
}

resource "azuredevops_user_entitlement" "example" {
  principal_name = "[email protected]"
}

data "azuredevops_group" "example" {
  project_id = azuredevops_project.example.id
  name       = "Build Administrators"
}

resource "azuredevops_group_membership" "example" {
  group = data.azuredevops_group.example.descriptor
  members = [
    azuredevops_user_entitlement.example.descriptor
  ]
}

Argument Reference

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 1. It's possible to define group members both within the azuredevops_group_membership resource via the members block and by using the azuredevops_group resource. However it's not possible to use both methods to manage group members, since there'll be conflicts.
    2. The members uses descriptor as the identifier not Resource ID or others.


  • mode - (Optional) The mode how the resource manages group members.

    ~>NOTE 1. mode = add: the resource will ensure that all specified members will be part of the referenced group
    2. mode = overwrite: the resource will replace all existing members with the members specified within the members block
    3. To clear all members from a group, specify an empty list of descriptors in the members attribute and set the mode member to overwrite.

Attributes Reference

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.

Relevant Links

Timeouts

The timeouts block allows you to specify timeouts for certain actions:

  • create - (Defaults to 10 minutes) Used when creating the Group membership.
  • read - (Defaults to 5 minute) Used when retrieving the Group membership.
  • update - (Defaults to 10 minutes) Used when updating the Group membership.
  • delete - (Defaults to 10 minutes) Used when deleting the Group membership.

PAT Permissions Required

  • Deployment Groups: Read & Manage