GSLabDev / terraform-provider-ad

Automates the Active Directory resource creation during Infrastructure build using Terraform Provider.
Mozilla Public License 2.0
61 stars 31 forks source link

ad_computer_to_ou creating duplicate computer object #15

Open dhansuhvt opened 5 years ago

dhansuhvt commented 5 years ago

Hello..Having issue when moving computer object to new OU.Rather than moving existing compute object it's creating new computer object in target OU.

provider "ad" { domain = "${var.VM_Domain}" user = "${var.domain_user}" password = "${var.domain_admin_password}" ip = "${var.ad_server_ip}" }

Add computer to Organizational Unit of Active Directory

resource "ad_computer_to_ou" "server_ou" { ou_distinguished_name = "${var.domain_ou}" computer_name = "${var.vsphere_virtual_machine_name}" }

surajsub commented 5 years ago

Did you use the provider to create the computer and then do a terraform plan to move it ? If so then it will not work. There is no update capability in this provider yet. Only Create/Read / Delete

bhushan-rane commented 5 years ago

Hello..Having issue when moving computer object to new OU.Rather than moving existing compute object it's creating new computer object in target OU.

provider "ad" { domain = "${var.VM_Domain}" user = "${var.domain_user}" password = "${var.domain_admin_password}" ip = "${var.ad_server_ip}" }

Add computer to Organizational Unit of Active Directory

resource "ad_computer_to_ou" "server_ou" { ou_distinguished_name = "${var.domain_ou}" computer_name = "${var.vsphere_virtual_machine_name}" }

@dhansuhvt this provider supports create new AD Object and not to move existing AD Object from one OU to other. Results your observing is expected.

dhansuhvt commented 5 years ago

Thanks for the update .

mael-brdn commented 4 years ago

Hello..Having issue when moving computer object to new OU.Rather than moving existing compute object it's creating new computer object in target OU. provider "ad" { domain = "${var.VM_Domain}" user = "${var.domain_user}" password = "${var.domain_admin_password}" ip = "${var.ad_server_ip}" }

Add computer to Organizational Unit of Active Directory

resource "ad_computer_to_ou" "server_ou" { ou_distinguished_name = "${var.domain_ou}" computer_name = "${var.vsphere_virtual_machine_name}" }

@dhansuhvt this provider supports create new AD Object and not to move existing AD Object from one OU to other. Results your observing is expected.

Will this feature be available at some point ?