nutanix / terraform-provider-nutanix

Terraform Nutanix Provider
https://www.terraform.io/docs/providers/nutanix/
Mozilla Public License 2.0
97 stars 112 forks source link

Error: The terraform-provider-nutanix_v1.9.5.exe plugin crashed! #689

Open honestabe00 opened 2 weeks ago

honestabe00 commented 2 weeks ago

Nutanix Cluster Information

Terraform Version

Terraform v1.9.5 on windows_386

data "nutanix_cluster" "cluster" { name = var.cluster_name } data "nutanix_subnet" "subnet" { subnet_name = var.subnet_name }

provider "nutanix" { username = var.user password = var.password endpoint = var.endpoint insecure = true wait_timeout = 60 }

resource "nutanix_image" "image" { name = "Arch Linux" description = "Arch-Linux-x86_64-basic-20210401.18564" source_uri = "https://mirror.pkgbuild.com/images/latest/Arch-Linux-x86_64-basic-20210415.20050.qcow2" }

resource "nutanix_virtual_machine" "mktest" { name = "mktest" cluster_uuid = data.nutanix_cluster.cluster.id num_vcpus_per_socket = "2" num_sockets = "1" memory_size_mib = 1024

disk_list { data_source_reference = { kind = "image" uuid = nutanix_image.image.id } }

disk_list { disk_size_bytes = 10 1024 1024 * 1024 device_properties { device_type = "DISK" disk_address = { "adapter_type" = "SCSI" "device_index" = "1" } } } nic_list { subnet_uuid = data.nutanix_subnet.subnet.id } }

Debug Output

Panic Output

Expected Behavior

Deploy Nutanix VM mktest

Steps to Reproduce

  1. terraform apply

    Important Factors

    • 0000 <!---Github Issue number --->

Haroon-Dweikat-Ntx commented 2 days ago

Hi @honestabe00

This isn't a provider issue, it's related to the Terraform SDK. It often happens when users accidentally install the 32-bit version of Terraform, which can still run on 64-bit systems.

Integer Limitations:

On 32-bit systems, the maximum signed integer is 2,147,483,647 (2³¹ - 1). If you use a value larger than this, like 10,737,418,240 (10¹⁰, ~10 GB), it exceeds the limit. This triggers a strconv.ParseInt error, throwing "value out of range."

The 64-bit version, however, can handle integers up to 9,223,372,036,854,775,807 (2⁶³ - 1), which is why the error doesn't appear when using it.

Solution:

Install the 64-bit version of Terraform to resolve this issue.

For example, if you check your Terraform version and see:

Terraform v1.9.5
on windows_386

You're using the 32-bit version. After downloading the 64-bit version, the output should look like this:

Terraform v1.9.5
on windows_amd64

This will fix the integer limit problem.

honestabe00 commented 2 days ago

Thanks. I will look and verify the version.

From: Haroon Dweikat Ntx @.> Sent: Tuesday, October 1, 2024 6:54 AM To: nutanix/terraform-provider-nutanix @.> Cc: Knapp, Matthew @.>; Mention @.> Subject: Re: [nutanix/terraform-provider-nutanix] Error: The terraform-provider-nutanix_v1.9.5.exe plugin crashed! (Issue #689)

Hi @honestabe00https://github.com/honestabe00

This isn't a provider issue, it's related to the Terraform SDK. It often happens when users accidentally install the 32-bit version of Terraform, which can still run on 64-bit systems.

Integer Limitations:

On 32-bit systems, the maximum signed integer is 2,147,483,647 (2³¹ - 1). If you use a value larger than this, like 10,737,418,240 (10¹⁰, ~10 GB), it exceeds the limit. This triggers a strconv.ParseInt error, throwing "value out of range."

The 64-bit version, however, can handle integers up to 9,223,372,036,854,775,807 (2⁶³ - 1), which is why the error doesn't appear when using it.

Solution:

Install the 64-bit version of Terraform to resolve this issue.

For example, if you check your Terraform version and see:

Terraform v1.9.5

on windows_386

You're using the 32-bit version. After downloading the 64-bit version, the output should look like this:

Terraform v1.9.5

on windows_amd64

This will fix the integer limit problem.

— Reply to this email directly, view it on GitHubhttps://github.com/nutanix/terraform-provider-nutanix/issues/689#issuecomment-2385577298, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BLMV7IPC7MKYUUDL2C7VNZLZZKEONAVCNFSM6AAAAABOQOHFSKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGOBVGU3TOMRZHA. You are receiving this because you were mentioned.Message ID: @.**@.>>