Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing description from ad_ou resource results in an error #178

Open
keitharm opened this issue Jun 5, 2023 · 0 comments
Open

Removing description from ad_ou resource results in an error #178

keitharm opened this issue Jun 5, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@keitharm
Copy link

keitharm commented Jun 5, 2023

Terraform Version and Provider Version

Terraform: Terraform v1.4.6 on darwin_arm64
Provider: hashicorp/ad v0.4.4

Windows Version

Windows Server 2022

Affected Resource(s)

ad_ou

Probably includes other resources with attributes that are not being properly cleared by being set to $null.

Terraform Configuration Files

resource "ad_ou" "standard" { 
  name = "Standard"
  description = "Test Description" # Remove and re-apply changes after 1st run to get error
  # description = "" # You can also set description to an empty string to get error
  path = "OU=Users,OU=ad,DC=ad,DC=test,DC=com"
  protected = true
}

Expected Behavior

The description attribute should have been removed from the OU.

Actual Behavior

Error: Set-ADOrganizationalUnit exited with a non-zero exit code 1, stderr :Set-ADOrganizationalUnit : replaceAt line:4 char:2
│  Set-ADOrganizationalUnit -Identity "OU=Standard,OU=Users,OU=ad, ...
│  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
│ CategoryInfo          : InvalidOperation: (OU=Standard,OU=...d,DC=test,DC=com:ADOrganizationalUnit) [Set-ADOrgani zationalUnit], ADInvalidOperationException
│ FullyQualifiedErrorId : ActiveDirectoryServer:0,Microsoft.ActiveDirectory.Management.Commands.SetADOrganizationa lUnit

Steps to Reproduce

  1. terraform apply

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
@keitharm keitharm added the bug Something isn't working label Jun 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant