{"action":"created","issue":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-vsphere/issues/562","repository_url":"https://api.github.com/repos/terraform-providers/terraform-provider-vsphere","labels_url":"https://api.github.com/repos/terraform-providers/terraform-provider-vsphere/issues/562/labels{/name}","comments_url":"https://api.github.com/repos/terraform-providers/terraform-provider-vsphere/issues/562/comments","events_url":"https://api.github.com/repos/terraform-providers/terraform-provider-vsphere/issues/562/events","html_url":"https://github.com/terraform-providers/terraform-provider-vsphere/issues/562","id":335963056,"node_id":"MDU6SXNzdWUzMzU5NjMwNTY=","number":562,"title":"Can't change disk type when provisioning from template","user":{"login":"conorcasey","id":17168452,"node_id":"MDQ6VXNlcjE3MTY4NDUy","avatar_url":"https://avatars1.githubusercontent.com/u/17168452?v=4","gravatar_id":"","url":"https://api.github.com/users/conorcasey","html_url":"https://github.com/conorcasey","followers_url":"https://api.github.com/users/conorcasey/followers","following_url":"https://api.github.com/users/conorcasey/following{/other_user}","gists_url":"https://api.github.com/users/conorcasey/gists{/gist_id}","starred_url":"https://api.github.com/users/conorcasey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/conorcasey/subscriptions","organizations_url":"https://api.github.com/users/conorcasey/orgs","repos_url":"https://api.github.com/users/conorcasey/repos","events_url":"https://api.github.com/users/conorcasey/events{/privacy}","received_events_url":"https://api.github.com/users/conorcasey/received_events","type":"User","site_admin":false},"labels":[{"id":620326264,"node_id":"MDU6TGFiZWw2MjAzMjYyNjQ=","url":"https://api.github.com/repos/terraform-providers/terraform-provider-vsphere/labels/enhancement","name":"enhancement","color":"d4c5f9","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-06-26T19:39:24Z","updated_at":"2018-10-18T13:54:37Z","closed_at":"2018-08-07T16:27:30Z","author_association":"NONE","body":"ISSUE:-\r\n\r\nI'm leveraging Terraform to provision vSphere VMs from a template for a customer. The template is thin provisioned and I want the provisioned VM to be Thick Lazy Zeroed. Based to the documentation the following should work:-\r\n\r\n  disk {\r\n    label = \"${var.vsphere_disk0_label}\"\r\n    size  = \"${data.vsphere_virtual_machine.template.disks.0.size}\"\r\n    eagerly_scrub = false\r\n    thin_provisioned = false\r\n  }\r\n\r\nHowever I get the following error:-\r\n\r\n\"vsphere_virtual_machine.vm: error reconfiguring virtual machine: error processing disk change post-clone: disk.0: cannot  change the value of \"thin-provisioned\" (old: true new: false)\"\r\n\r\n\r\n\r\n### Terraform Version\r\n\r\nv0.11.7\r\n\r\n### vSphere Provider Version\r\n\r\nv1.5.0 x4\r\n\r\n### Affected Resource(s)\r\n\r\nPlease list the resources as a list, for example:\r\n- `vsphere_virtual_machine`\r\n\r\n\r\n### Terraform Configuration Files\r\n\r\n# Setup vSphere provider\r\nprovider \"vsphere\" {\r\n  version        = \"~> 1.4\"\r\n  user           = \"${var.vsphere_user}\"\r\n  password       = \"${var.vsphere_password}\"\r\n  vsphere_server = \"${var.vsphere_server}\"\r\n\r\n  allow_unverified_ssl = \"${var.vsphere_unverified_ssl}\"\r\n}\r\n\r\n# Data sources for resources\r\ndata \"vsphere_datacenter\" \"datacenter\" {\r\n  name = \"${var.vsphere_datacenter}\"\r\n}\r\n\r\ndata \"vsphere_resource_pool\" \"pool\" {\r\n  name          = \"${var.vsphere_resource_pool}\"\r\n  datacenter_id = \"${data.vsphere_datacenter.datacenter.id}\"\r\n}\r\n\r\ndata \"vsphere_network\" \"network\" {\r\n  name          = \"${var.vsphere_network}\"\r\n  datacenter_id = \"${data.vsphere_datacenter.datacenter.id}\"\r\n}\r\n\r\ndata \"vsphere_datastore\" \"datastore\" {\r\n  name          = \"${var.vsphere_datastore}\"\r\n  datacenter_id = \"${data.vsphere_datacenter.datacenter.id}\"\r\n}\r\n\r\ndata \"vsphere_virtual_machine\" \"template\" {\r\n  name          = \"${var.vsphere_template}\"\r\n  datacenter_id = \"${data.vsphere_datacenter.datacenter.id}\"\r\n}\r\n\r\n# Create a vSphere VM\r\nresource \"vsphere_virtual_machine\" \"vm\" {\r\n  name             = \"${var.vsphere_vm_name}\"\r\n  datastore_id     = \"${data.vsphere_datastore.datastore.id}\"\r\n  resource_pool_id = \"${data.vsphere_resource_pool.pool.id}\"\r\n  scsi_type        = \"${data.vsphere_virtual_machine.template.scsi_type}\"\r\n\r\n  # VM resources\r\n  num_cpus = \"${var.vsphere_cpus}\"\r\n  memory   = \"${var.vsphere_memory}\"\r\n\r\n  #guest_id = \"${var.vsphere_guest_id}\"\r\n  guest_id = \"${data.vsphere_virtual_machine.template.guest_id}\"\r\n\r\n  disk {\r\n    label = \"${var.vsphere_disk0_label}\"\r\n    size  = \"${data.vsphere_virtual_machine.template.disks.0.size}\"\r\n    eagerly_scrub = false\r\n    thin_provisioned = false\r\n  }\r\n\r\n  network_interface {\r\n    network_id = \"${data.vsphere_network.network.id}\"\r\n    adapter_type = \"${data.vsphere_virtual_machine.template.network_interface_types[0]}\"\r\n  }\r\n\r\n  clone {\r\n    template_uuid = \"${data.vsphere_virtual_machine.template.id}\"\r\n\r\n    customize {\r\n      windows_options {\r\n        computer_name = \"${var.vsphere_vm_name}\"\r\n\r\n      //  join_domain = \"${var.vsphere_domain}\"\r\n      //  domain_admin_user = \"${var.vsphere_domain_user}\"\r\n      //  domain_admin_password = \"${var.vsphere_domain_password}\"\r\n        //domain_ou = \"${var.vsphere_domain_ou}\"\r\n      }\r\n\r\n      network_interface {\r\n        ipv4_address = \"${var.vsphere_ipv4_address}\"\r\n        ipv4_netmask = \"${var.vsphere_ipv4_netmask}\"\r\n        dns_server_list = \"${var.vsphere_dns_server_list}\"\r\n      }\r\n\r\n      ipv4_gateway = \"${var.vsphere_ipv4_gateway}\"\r\n    }\r\n  }\r\n}\r\n\r\n### Debug Output\r\n\r\nN/A\r\n\r\n### Panic Output\r\n\r\nIf Terraform produced a panic, please provide a link to a GitHub Gist containing\r\nthe output of the `crash.log`.\r\n\r\n### Expected Behavior\r\n\r\nI would expect the disk type to be changed from thin-provisioed to thick-eager-zero. This is possible if provisioning a VM from a template directly in vCenter or via PowerCLI so I would assume is possible here in Terraform like the documentation suggests.\r\n\r\n### Actual Behavior\r\n\r\nSee description under \"ISSUE\" at start of text.\r\n\r\n### Steps to Reproduce\r\n\r\nPlease list the steps required to reproduce the issue, for example:\r\n1. `terraform apply`\r\n\r\n### Important Factoids\r\n\r\nAre there anything atypical about your infrastructure that we should know about\r\nthat could be causing an edge case or something not necessarily obvious? If so,\r\nplease state it here.\r\n\r\n### References\r\n\r\nAre there any other GitHub issues (open or closed) or Pull Requests that should\r\nbe linked here? For example:\r\n- GH-1234\r\n"},"comment":{"url":"https://api.github.com/repos/terraform-providers/terraform-provider-vsphere/issues/comments/431017720","html_url":"https://github.com/terraform-providers/terraform-provider-vsphere/issues/562#issuecomment-431017720","issue_url":"https://api.github.com/repos/terraform-providers/terraform-provider-vsphere/issues/562","id":431017720,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMTAxNzcyMA==","user":{"login":"kaizoku0506","id":9777085,"node_id":"MDQ6VXNlcjk3NzcwODU=","avatar_url":"https://avatars2.githubusercontent.com/u/9777085?v=4","gravatar_id":"","url":"https://api.github.com/users/kaizoku0506","html_url":"https://github.com/kaizoku0506","followers_url":"https://api.github.com/users/kaizoku0506/followers","following_url":"https://api.github.com/users/kaizoku0506/following{/other_user}","gists_url":"https://api.github.com/users/kaizoku0506/gists{/gist_id}","starred_url":"https://api.github.com/users/kaizoku0506/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kaizoku0506/subscriptions","organizations_url":"https://api.github.com/users/kaizoku0506/orgs","repos_url":"https://api.github.com/users/kaizoku0506/repos","events_url":"https://api.github.com/users/kaizoku0506/events{/privacy}","received_events_url":"https://api.github.com/users/kaizoku0506/received_events","type":"User","site_admin":false},"created_at":"2018-10-18T13:54:37Z","updated_at":"2018-10-18T13:54:37Z","author_association":"NONE","body":"@bill-rich - has this enhancement been implemented?  We are hitting the same issue (a thick provisioned template is ~30GB and thus significantly slower to clone compared to a thin provisioned template is ~1.2GB.).  If this is coming in a soon-to-be-released version, that would be fantastic news."}}
{"actor":{"display_login":"kaizoku0506"}}