terraform-provider-proxmox
terraform-provider-proxmox copied to clipboard
iothread and ssd emulation not enabled during resource creation and modification
Describe the bug
I have both iothread and ssd set to true but these settings are not properly set on Proxmox even when executing terraform apply the second time.
To Reproduce Steps to reproduce the behavior:
- Create a resource by cloning an existing template. This resource should have a resized (larger) scsi0 disk (containing cloud-init image).
The template:
- Run
terraform applyand check action preview before execution:
+ disk {
+ cache = "none"
+ datastore_id = "nvme-a"
+ discard = "ignore"
+ file_format = (known after apply)
+ interface = "scsi0"
+ iothread = true
+ path_in_datastore = (known after apply)
+ size = 20
+ ssd = true
}
- Confirm yes to
terraform apply. - Check Proxmox disk resource:
Here we can see iothread and ssd emulation are not set.
-
Run
terraform applyagain and check preview: -
Confirm yes to
terraform apply. -
Check Proxmox GUI:
This time cache was changed from Default to none.
Resource configuration:
resource "proxmox_virtual_environment_vm" "stg-k8s-master-1" {
provider = proxmox.pve4
name = "stg-k8s-master-1"
node_name = "pve4"
vm_id = 4101
tablet_device = false
scsi_hardware = "virtio-scsi-single"
agent {
enabled = true
}
clone {
vm_id = 9001
full = true
}
cpu {
cores = 4
type = "x86-64-v2-AES"
}
memory {
dedicated = 4096
}
disk {
datastore_id = "nvme-a"
interface = "scsi0"
size = 20
iothread = true
ssd = true
}
network_device {
model = "virtio"
bridge = "vmbr0"
firewall = false
vlan_id = 20
}
initialization {
datastore_id = "nvme-a"
user_account {
username = var.ciuser
password = var.cipassword
keys = var.sshkeys
}
ip_config {
ipv4 {
address = "10.20.0.91/24"
gateway = "10.20.0.1"
}
}
}
}
Expected behavior
iothread and ssd emulation should be enabled on resource creation and modification.
Screenshots *Already provided above *
Additional context I have not tried when creating a resource without cloning a template.
- Single or clustered Proxmox: Single
- Provider version (ideally it should be the latest version): latest
- Terraform version: 1.6.6
- OS (where you run Terraform from): Ubuntu Cinnamon 22.04
- Debug logs (
TF_LOG=DEBUG terraform apply): Will supply if required
Also related:
- https://github.com/bpg/terraform-provider-proxmox/issues/360
Marking this issue as stale due to inactivity in the past 180 days. This helps us focus on the active issues. If this issue is reproducible with the latest version of the provider, please comment. If this issue receives no comments in the next 30 days it will automatically be closed. If this issue was automatically closed and you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thank you!