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

Add support for domain_OU windows customization #2180

Closed
4 tasks done
ultral opened this issue Apr 26, 2024 · 4 comments · Fixed by #2181
Closed
4 tasks done

Add support for domain_OU windows customization #2180

ultral opened this issue Apr 26, 2024 · 4 comments · Fixed by #2181
Labels
duplicate Status: Duplicate Issue enhancement Type: Enhancement
Milestone

Comments

@ultral
Copy link
Contributor

ultral commented Apr 26, 2024

Community Guidelines

  • I have read and agree to the HashiCorp Community Guidelines .
  • Vote on this issue by adding a 👍 reaction to the original issue initial description to help the maintainers prioritize.
  • Do not leave "+1" or other comments that do not add relevant information or questions.
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Description

there is realted #996 . however after that domain_OU parameter has been released in vcenter 8.

Use Case(s)

add VM into specific during creation via single param i.e.

resource "vsphere_virtual_machine" "vm" {
  # ... other configuration ...
  clone {
    # ... other configuration ...
    customize {
      # ... other configuration ...
      windows_options {
        domain_ou             = "OU=Sandbox,OU=Workstations,DC=example,DC=com"
      }
    }
  }
}

instead kludges like

  provisioner "remote-exec" {
   inline = [
     "powershell.exe Add-Computer -DomainName 'example.com' -OUPath 'OU=Sandbox,OU=Workstations,DC=example,DC=com' -Credential (New-Object System.Management.Automation.PSCredential('example\\DomainJoin', (ConvertTo-SecureString 'mysecretpassword' -AsPlainText -Force))) -Restart -Force"
   ]
    connection {
     type     = "winrm"
     user     = "Administrator"
     password = "anothersecretpassword"
     use_ntlm = true
     host     = self.default_ip_address
    }
  }

  provisioner "remote-exec" {
   when = destroy
   inline = [
     "powershell.exe Remove-Computer -UnjoinDomaincredential (New-Object System.Management.Automation.PSCredential('example\\DomainJoin', (ConvertTo-SecureString 'mysecretpassword' -AsPlainText -Force))) -Force"
   ]
   connection {
     type     = "winrm"
     user     = "DomainJoin"
     password = "mysecretpassword"
     use_ntlm = true
     host     = self.default_ip_address 
    }
  }
} 

Potential Terraform Provider Configuration

resource "vsphere_virtual_machine" "vm" {
  # ... other configuration ...
  clone {
    # ... other configuration ...
    customize {
      # ... other configuration ...
      windows_options {
        domain_ou             = "OU=Sandbox,OU=Workstations,DC=example,DC=com"
      }
    }
  }
}

References

@ultral ultral added the enhancement Type: Enhancement label Apr 26, 2024
Copy link

Hello, ultral! 🖐

Thank you for submitting an issue for this provider. The issue will now enter into the issue lifecycle.

If you want to contribute to this project, please review the contributing guidelines and information on submitting pull requests.

@ultral ultral changed the title Add support for domain_OU windows custoiuzation Add support for domain_OU windows customization Apr 26, 2024
@tenthirtyam
Copy link
Collaborator

Duplicate of #2130

@tenthirtyam tenthirtyam marked this as a duplicate of #2130 Apr 26, 2024
@tenthirtyam tenthirtyam added the duplicate Status: Duplicate Issue label Apr 26, 2024
@tenthirtyam tenthirtyam closed this as not planned Won't fix, can't repro, duplicate, stale Apr 26, 2024
@tenthirtyam tenthirtyam added this to the v2.8.0 milestone Apr 30, 2024
Copy link

github-actions bot commented May 8, 2024

This functionality has been released in v2.8.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

Copy link

github-actions bot commented Jun 8, 2024

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate Status: Duplicate Issue enhancement Type: Enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants