Open thesefer opened 2 months ago
Hello, thesefer! π
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.
Found #2178 being a duplicate of #2116 but as per their description it looks like my problem extends the underlying issue.
Please verify with the latest - v2.8.2 - and let us know since the reported version is rather old.
Hi, I've been a bit constrained last week.
I just ran the same config using v2.8.2:
thick
provision:
eagerly_scrub = false
and thin_provisioned = false
-> thick
eagerly_scrub = false
and thin_provisioned = true
-> thick
(would be thin)eagerZeroedThick
provision:
eagerly_scrub = true
and thin_provisioned = false
-> thick
eagerly_scrub = false
and thin_provisioned = true
-> eagerZeroedThick
(would be thin)eagerly_scrub = false -> true
β Error: disk.0: cannot change the value of "eagerly_scrub" - (old: false newValue: true)
β
β with vsphere_virtual_machine.vms[0],
β on resources.tf line 58, in resource "vsphere_virtual_machine" "vms":
β 58: resource "vsphere_virtual_machine" "vms" {
At least I can still destroy the resource without an error but consecutive will fail because the state does not match the disks.
Community Guidelines
Terraform
Terraform v1.4.2
Terraform Provider
v2.0.2
VMware vSphere
8.0.2.00200
Description
The dynamic disk0 is wrongly created as
thin
despite statingeagerly_scrub: true, thin_provisioned: false
. This fails consecutive runs. Persistent / attached dynamic disk1 shows a wrongeagerly_scrub: false, thin_provisioned: true
but is created correctly aseagerZeroedThick
The template was created with packer with a thin disk. Creating the VM manually "Deploy from Template -> VM Templates" and setting "Select virtual disk format" to i.e. "Thick Provision Eager Zeroed" properly creates the disk.
If the whole template is needed, please let me know.
Affected Resources or Data Sources
resource/vsphere_virtual_disk
resource/vsphere_virtual_machine
Terraform Configuration
Debug Output
https://gist.github.com/thesefer/609fcb7334031c7d9d60699b5c1cf2c8
Panic Output
No response
Expected Behavior
disk0 correctly created as
lazy
,thin
oreagerZeroedThick
Actual Behavior
disk0 created as thin (displayed as eager in plan/apply) disk1 created as eager (displayed as thin in plan/apply)
Steps to Reproduce
-
Environment Details
No response
Screenshots
No response
References
No response