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
The container should not be "changed" on every apply when using the "id" attribute for the ou.
Actual Behavior
Every terraform run the plan is to move the object to a new container because the id does not match the dn. If we use the dn it will give warnings about a deprecated attribute.
# ad_group.admin will be updated in-place
~ resource "ad_group" "admin" {
~ container = "OU=Identity,DC=xxx,DC=xxx,DC=xxx" -> "cceac71f-e489-43cc-be41-7f0ed4f851bd"
id = "33d8ca18-b82d-41da-864e-0dad71c63e59"
name = "IAM-Admins"
# (6 unchanged attributes hidden)
}
Plan: 0 to add, 1 to change, 0 to destroy.
Deprecated attribute warning
│ Warning: Deprecated attribute
│
│ on ad-groups.tf line 3, in resource "ad_group" "admin":
│ 3: path = data.ad_ou.Identity.dn
│
│ The attribute "dn" is deprecated. Refer to the provider documentation for details.
Steps to Reproduce
Attempt to use the "id" attribute of the ad_ou object to place an object in a container. It has to use the dn to avoid the warning but will attempt to move the object every run.
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:
I'm using the AD provider version 0.5.0 and also had a problem linked to the depreciation of the attribute dn.
Like you, I was using a datasource to get the id of the container, then provide this ID to my ad_group resource.
In my case, doing this resulted in a powershell error saying that command New-ADGroup exited with a non-zero exit code 1, stderr: New-ADGroup : The object name has bad syntaxAt line:4 char:2. I had the exact same error while manually running the powershell command from a powershell shell directly in my AD server. There was nothing strange in my group name (only lower case letters, less than 10 caracters)
So I tried to use the property ad_ou.dn instead of ad_ou.id, which works but triggers a depreciation warning.
Finally, I decided to directly use the name of the container instead of its ID, so I removed the datasource :
Terraform Version and Provider Version
Terraform v1.2.8
on windows_amd64
Windows Version
Windows 10
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
The container should not be "changed" on every apply when using the "id" attribute for the ou.
Actual Behavior
Every terraform run the plan is to move the object to a new container because the id does not match the dn. If we use the dn it will give warnings about a deprecated attribute.
Deprecated attribute warning
Steps to Reproduce
Attempt to use the "id" attribute of the ad_ou object to place an object in a container. It has to use the dn to avoid the warning but will attempt to move the object every run.
Community Note
The text was updated successfully, but these errors were encountered: