Open v-esteves opened 1 year ago
Terraform v1.3.8 on windows_386
Windows Server 2022 Datacenter Azure Edition
ad_group_membership
terraform { required_providers { ad = { source = "hashicorp/ad" version = "0.4.4" } azurerm = { source = "hashicorp/azurerm" version = ">= 3.25.0" } } } provider "ad" { winrm_hostname = "" winrm_username = "" winrm_password = "" } provider azurerm { features {} } variable "groups" { type = list(object({ group = string })) } data "ad_group" "ad_group" { count = length(var.groups) group_id = var.groups[count.index].group } resource "ad_group_membership" "ad_group_member" { for_each = {for i, v in data.ad_group.ad_group: i => v} group_id = each.value.id group_members = [ "4dec9478-2511-4640-8102-3a456a404643" ] }
Terraform apply executes correctly and the user is added to an existing list of groups. Terraform destroy removes the user from the groups.
Terraform destroy removes ALL users from the groups, not only the added user.
Any movement on this issue? We have many shared groups that servers are added to for SCCM, Certificate auto-enrollment, etc. Removing all members would be extremely impacting.
Terraform Version and Provider Version
Terraform v1.3.8 on windows_386
Windows Version
Windows Server 2022 Datacenter Azure Edition
Affected Resource(s)
ad_group_membership
Terraform Configuration Files
Expected Behavior
Terraform apply executes correctly and the user is added to an existing list of groups. Terraform destroy removes the user from the groups.
Actual Behavior
Terraform destroy removes ALL users from the groups, not only the added user.
Steps to Reproduce
Community Note