Hi Guys,
I am new to terraform. I was playing around with the azuredevops provider, try to add an azure ad group to a project group like project administrators using the azuredevops_group_membership resource.
I can see that individual users can be added but does anyone know of azure AD groups can be added?
Has anyon been able to do this?
I have the same question. For now, I can only manage to add one single user.
# "Create" the group in Azure DevOps, provide the AAD group object ID.
resource "azuredevops_group" "aad_link" {
origin_id = <AAD Group Object ID>
}
# Add this 'new' group as member of your AzDo group
resource "azuredevops_group_membership" "aad_group_member_of_azdo_group" {
group = <parent AzDo group>.descriptor
members = [
azuredevops_group.aad_link.descriptor
]
}
This doesn’t work for me. Terraform doesn’t like the .descriptor tag on the member add.
Get this error when using the ID
Error adding group memberships during create: Error adding group memberships during update: Error adding member to group : Page not found.
Here is my code:
data “azuread_group” “AAD_Developers” {
display_name = “”
security_enabled = true
}
output “AAD_Developers_group_id” {
value = data.azuread_group.AAD_Developers.id
}
resource “azuredevops_group” “azdo_devs_group_linked_to_aad_devs_group” {
origin_id = data.azuread_group.AAD_Developers.id
}
resource “azuredevops_group_membership” “assign_developers” {
group = “##ProjectName##_Developers”
members = [
data.azuread_group.AAD_Developers.id
]
}