# Vsphere provider, only create

**URL:** <https://discuss.hashicorp.com/t/vsphere-provider-only-create/7168>\
**Category:** VMware\
**Created:** [March 28, 2020, 11:49am UTC](https://discuss.hashicorp.com/t/vsphere-provider-only-create/7168 "2020-03-28T11:49:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![erickfear](https://sea2.discourse-cdn.com/hashicorp/user_avatar/discuss.hashicorp.com/erickfear/32/5619_2.png) [@erickfear](https://discuss.hashicorp.com/u/erickfear)\
**Post date:** [March 28, 2020, 11:49am UTC](https://discuss.hashicorp.com/t/vsphere-provider-only-create/7168/1 "2020-03-28T11:49:53Z")

</div>

Hi  
I’ve got only one question, I want to use terraform only as a cloning tool, I dont want to  
manage via terraform VM’s that have been created. How can I do that ?  
Thx for any comments.

resource “vsphere\_virtual\_machine” “vm2” {  
name = var.vm\_name  
resource\_pool\_id = data.vsphere\_host.host.resource\_pool\_id  
datastore\_id = data.vsphere\_datastore.datastore.id  
annotation = “hurray it’s done”

num\_cpus = 2  
memory = 8024  
guest\_id = data.vsphere\_virtual\_machine.template.guest\_id

scsi\_type = data.vsphere\_virtual\_machine.template.scsi\_type

network\_interface {  
network\_id = data.vsphere\_network.network.id  
adapter\_type = data.vsphere\_virtual\_machine.template.network\_interface\_types[0]  
}

disk {  
label = “disk0”  
size = data.vsphere\_virtual\_machine.template.disks.0.size  
eagerly\_scrub = data.vsphere\_virtual\_machine.template.disks.0.eagerly\_scrub  
thin\_provisioned = data.vsphere\_virtual\_machine.template.disks.0.thin\_provisioned  
unit\_number = 0  
}  
disk {  
label = “disk1”  
size = 14  
eagerly\_scrub = data.vsphere\_virtual\_machine.template.disks.0.eagerly\_scrub  
thin\_provisioned = data.vsphere\_virtual\_machine.template.disks.0.thin\_provisioned  
unit\_number = 1  
}

clone {  
template\_uuid = data.vsphere\_virtual\_machine.template.id

```
customize {
  windows_options {
    computer_name = var.vm_name
     workgroup = "Workgroup"
    admin_password = var.vsphere_password
    time_zone = "90"
  }
  
  network_interface {}
}
timeout = "60"

```

}

```
lifecycle {
ignore_changes = [
  "network_interface",
  "imported",
  "clone",
  "name",
]

```

}
