Code of Conduct
Terraform
v1.14.0
Terraform Provider
v2.16.1
VMware vSphere
7.0.3.01900
Description
I'm not able to deploy a VM when I use a template's details to fetch the "thin_provisioned" data.
When I initially do the terraform plan, the thin_provisioned is set to true, but when i apply, it goes to false and then in between the apply it changes back to true, throwing the below error
Error: Provider produced inconsistent final plan
│
│ When expanding the plan for module.nameserver[0].vsphere_virtual_machine.cloud_init_instance[0] to include new values learned so far during apply, provider
│ "registry.terraform.io/vmware/vsphere" produced an invalid new value for .disk[0].thin_provisioned: was cty.False, but now cty.True.
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
This issue looks exactly like #1125
The terraform configurations I use is also same as the one the issue #1125
Affected Resources or Data Sources
resource/vsphere_virtual_machine
Terraform Configuration
data "vsphere_virtual_machine" "template_info" {
count = var.ova_url == null ? 1 : 0
name = var.template_name
datacenter_id = data.vsphere_datacenter.datacenter.id
}
resource "vsphere_virtual_machine" "cloud_init_instance" {
count = var.ova_url == null && var.enable_user_data ? 1 : 0
name = var.name
resource_pool_id = local.cluster != "standalone" ? data.vsphere_compute_cluster.cluster[0].resource_pool_id : data.vsphere_resource_pool.default[0].id
host_system_id = data.vsphere_host.host.id
datastore_id = data.vsphere_datastore.datastore.id
num_cpus = var.cpu
memory = var.memory * 1024
guest_id = data.vsphere_virtual_machine.template_info[0].guest_id
firmware = data.vsphere_virtual_machine.template_info[0].firmware
scsi_type = data.vsphere_virtual_machine.template_info[0].scsi_type
wait_for_guest_net_timeout = 60
wait_for_guest_ip_timeout = 60
dynamic "network_interface" {
for_each = {
for idx, net in local.network_names:
idx => net
}
content {
network_id = data.vsphere_network.subnet_info[network_interface.value].id
}
}
disk {
label = "disk0"
size = var.disk_size
thin_provisioned = data.vsphere_virtual_machine.template_info[0].disks.0.thin_provisioned
}
clone {
template_uuid = data.vsphere_virtual_machine.template_info[0].id
timeout = 300
}
extra_config = local.user_data_config
lifecycle {
ignore_changes = all
}
}
Debug Output
https://gist.github.com/Yogendiran-Subramanian/292dbe19a8356f3aedbfc8551dae0a19
Error: Provider produced inconsistent final plan
│
│ When expanding the plan for module.nameserver[0].vsphere_virtual_machine.cloud_init_instance[0] to include new values learned so far during apply, provider
│ "registry.terraform.io/vmware/vsphere" produced an invalid new value for .disk[0].thin_provisioned: was cty.False, but now cty.True.
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
Panic Output
No response
Expected Behavior
A VM should be created with the thin_provisioned config same as the template I used
Actual Behavior
Getting Inconsistent final plan error
Steps to Reproduce
- Create a template with thin_provisioned as true
- Use that template in data_source, get the thin_provisioned value
- Use that value in vsphere_virtual_machine.disk like this "data.vsphere_virtual_machine.template_info[0].disks.0.thin_provisioned"
- terraform apply
Environment Details
No response
Screenshots
No response
References
#1125
Code of Conduct
Terraform
v1.14.0
Terraform Provider
v2.16.1
VMware vSphere
7.0.3.01900
Description
I'm not able to deploy a VM when I use a template's details to fetch the "thin_provisioned" data.
When I initially do the terraform plan, the thin_provisioned is set to true, but when i apply, it goes to false and then in between the apply it changes back to true, throwing the below error
This issue looks exactly like #1125
The terraform configurations I use is also same as the one the issue #1125
Affected Resources or Data Sources
resource/vsphere_virtual_machine
Terraform Configuration
Debug Output
https://gist.github.com/Yogendiran-Subramanian/292dbe19a8356f3aedbfc8551dae0a19
Error: Provider produced inconsistent final plan
│
│ When expanding the plan for module.nameserver[0].vsphere_virtual_machine.cloud_init_instance[0] to include new values learned so far during apply, provider
│ "registry.terraform.io/vmware/vsphere" produced an invalid new value for .disk[0].thin_provisioned: was cty.False, but now cty.True.
│
│ This is a bug in the provider, which should be reported in the provider's own issue tracker.
Panic Output
No response
Expected Behavior
A VM should be created with the thin_provisioned config same as the template I used
Actual Behavior
Getting Inconsistent final plan error
Steps to Reproduce
Environment Details
No response
Screenshots
No response
References
#1125