You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ad_ou.ou: Refreshing state... [id=66d4498f-fcb0-4858-b277-3ad41a3d1349]
ad_group.g["foo_bar"]: Refreshing state... [id=7886cad7-18ac-4805-a1ea-87db890610fd]
ad_group.g["foo_baz"]: Refreshing state... [id=0c99b6b6-f2e9-4b43-91fb-c7673d037219]
ad_group_membership.gm["bar"]: Refreshing state... [id=foo_baz_59f3d36a-9b1d-73b1-1cc9-586d680a946b]
ad_group_membership.gm["foo"]: Refreshing state... [id=foo_bar_447ec7bb-f1d4-898b-b529-e91260814de5]
╷
│ Error: command Get-ADGroupMember exited with a non-zero exit code(1), stderr: Get-ADGroupMember : Cannot find an object with identity: 'foo' under: 'DC=MYDC'.At line:4 char:2
│ Get-ADGroupMember -Identity "foo"-Credential $Credential -Server s6 ...
│ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
│ CategoryInfo : ObjectNotFound: (foo:ADGroup) [Get-ADGroupMember], ADIdentityNotFoundException
│ FullyQualifiedErrorId : ActiveDirectoryCmdlet:Microsoft.ActiveDirectory.Management.ADIdentityNotFoundException,M icrosoft.ActiveDirectory.Management.Commands.GetADGroupMember, stdout:
│
│ with ad_group_membership.gm["foo"],
│ on main.tf line 31, in resource "ad_group_membership""gm":
│ 31:resource"ad_group_membership""gm" {
│
╵
╷
│ Error: command Get-ADGroupMember exited with a non-zero exit code(1), stderr: Get-ADGroupMember : Cannot find an object with identity: 'foo' under: 'DC=DC'.At line:4 char:2
│ Get-ADGroupMember -Identity "foo"-Credential $Credential -Server s6 ...
│ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
│ CategoryInfo : ObjectNotFound: (foo:ADGroup) [Get-ADGroupMember], ADIdentityNotFoundException
│ FullyQualifiedErrorId : ActiveDirectoryCmdlet:Microsoft.ActiveDirectory.Management.ADIdentityNotFoundException,M icrosoft.ActiveDirectory.Management.Commands.GetADGroupMember, stdout:
│
│ with ad_group_membership.gm["bar"],
│ on main.tf line 31, in resource "ad_group_membership""gm":
│ 31:resource"ad_group_membership""gm" {
The powershell command is trying to find the AD group foo instead of foo_bar and foo_baz
Therefore it fails because the foo AD group does not exists...
The bug seems to be related to groups named with '_' in them. In case of '-' no error whatsoever !
What's very weird is that terraform destroy works correctly (with cached states)
Steps to Reproduce
terraform plan
Community Note
Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
If you are interested in working on this issue or have submitted a pull request, please leave a comment
The text was updated successfully, but these errors were encountered:
insoIite
changed the title
refreshing state is failing on ad_group_membership (search for truncated group name)
refreshing state is failing on ad_group_membership (groups named with '_')
Jul 25, 2022
Terraform Version and Provider Version
1.2.5
Affected Resource(s)
ad_group_membership
Terraform Configuration Files
Debug Output
https://gist.github.com/insoIite/40f63a2f3b30b0035b2af52ba4e1a1b9
Panic Output
Expected Behavior
Terraform plan should be working
Actual Behavior
The powershell command is trying to find the AD group
foo
instead offoo_bar
andfoo_baz
Therefore it fails because the
foo
AD group does not exists...The bug seems to be related to groups named with '_' in them. In case of '-' no error whatsoever !
What's very weird is that terraform destroy works correctly (with cached states)
Steps to Reproduce
terraform plan
Community Note
The text was updated successfully, but these errors were encountered: