[terraform] plan failed
-
terraform plan
ends up with errors
Error: The terraform-provider-proxmox_v2.9.10 plugin crashed!
This is always indicative of a bug within the plugin. It would be immensely
helpful if you could report the crash with the plugin's maintainers so that it
can be fixed. The output above should help diagnose the issue.
- Update telmate/proxmox provider
--- a/proxmox/terraform/versions.tf
+++ b/proxmox/terraform/versions.tf
@@ -3,7 +3,7 @@ terraform {
required_providers {
proxmox = {
source = "telmate/proxmox"
- version = "2.9.10"
+ version = "2.9.14"
}
rancher2 = {
source = "rancher/rancher2"
Then execute terraform init -upgrade
.
-
terraform plan
ends up with new errors
[...]
Changes to Outputs:
~ rancher2_cluster_archive_staging_rke2_summary = (sensitive value)
~ rancher2_cluster_test_staging_rke2_summary = (sensitive value)
╷
│ Warning: Failed to decode resource from state
│
│ Error decoding "module.rancher-node-staging-rke2-worker4.proxmox_vm_qemu.node" from prior state: bool is required
╵
[...]
╷
│ Error: bool is required
│
│ with module.deposit.proxmox_vm_qemu.node,
│ on ../modules/node/main.tf line 1, in resource "proxmox_vm_qemu" "node":
│ 1: resource "proxmox_vm_qemu" "node" {
│
╵
[...]
When I set the TF_LOG
to ERROR
, I can see these errors many times:
2024-09-19T15:22:14.753+0200 [ERROR] provider.terraform-provider-proxmox_v2.9.14: Response contains error diagnostic: @module=sdk.proto diagnostic_attribute="AttributeName(\"disk\").ElementKeyInt(0).AttributeName(\"backup\")" diagnostic_severity=ERROR diagnostic_summary="bool is required" tf_req_id=0ef8ea15-e78c-fcd0-b1b6-597b0aa78edf tf_resource_type=proxmox_vm_qemu tf_rpc=UpgradeResourceState @caller=github.com/hashicorp/terraform-plugin-go@v0.14.3/tfprotov5/internal/diag/diagnostics.go:55 diagnostic_detail="" tf_proto_version=5.3 tf_provider_addr=registry.terraform.io/telmate/proxmox timestamp="2024-09-19T15:22:14.753+0200"
2024-09-19T15:22:14.754+0200 [ERROR] vertex "module.rancher-node-test-rke2-worker1.proxmox_vm_qemu.node" error: bool is required
2024-09-19T15:22:14.754+0200 [ERROR] vertex "module.rancher-node-test-rke2-worker1.proxmox_vm_qemu.node (expand)" error: bool is required
- Check remote
tfstate
Pull the remote tfstate
ᐅ terraform state pull > current.state
Compare the number of returned errors and the number of disk/node in tfstate
:
ᐅ terraform plan -out plan.staging 2>&1 | grep "Error.*bool is required" | wc -l
26
ᐅ grep '"backup": 0' current.state | uniq -c
44 "backup": 0,
ᐅ grep '"disk":' current.state | uniq -c
26 "disk": [