Skip to content

Issue with proxmox_virtual_environment_datastores and large storages #2298

@DavBfr

Description

@DavBfr

Describe the bug

With a large storage: multiple petabytes, the provider crashes trying to parse the value from Proxmox.
It's given as an exp number, like 3.47726673451418e+15

To Reproduce
Steps to reproduce the behavior:

  1. Create a large datastore
  2. Run 'tofu apply'
  3. See error
data "proxmox_virtual_environment_datastores" "storage" { node_name = "pve } 

and the output of terraform|tofu apply.

Error: error retrieving datastores: failed to decode HTTP GET response (path: nodes/pve/storage) - Reason: json: cannot unmarshal number 3.47726673451418e+15 into Go struct field DatastoreListResponseData.data.total of type int 

Additional context
Add any other context about the problem here.

  • Clustered Proxmox
  • Proxmox version: 9.x
  • Provider version (ideally it should be the latest version): tested with 0.74 and 0.86
  • Terraform/OpenTofu version: OpenTofu v1.10.5
  • OS (where you run Terraform/OpenTofu from): Ubuntu 22.04

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions