-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
panic: Error reading level state: strconv.ParseInt: parsing "8580780465065941099": value out of range #16809
Comments
Generally speaking, It's hard to tell from your config & debug log which resource this is related to - could you share a minimal config (without modules or variables and with the smallest number of resources possible) that reproduces the issue? Thanks! |
@melinath Thank you for your help I use Terraform Cloud to store the state, but I execute terraform commands locally. I'm on a 64bits machine ( My project look like this: .
├── docs
│ └── img
│ └── logo.jpg
├── environments
│ ├── preprod
│ │ └── main.tf
│ ├── prod
│ │ └── main.tf
│ └── test
│ └── main.tf
├── Makefile
├── modules
│ └── staysail
│ ├── bucket.tf
│ ├── cloud_run.tf
│ ├── database.tf
│ ├── dns.tf
│ ├── etc
│ │ └── env.tpl
│ ├── iam.tf
│ ├── lb.tf
│ ├── main.tf
│ ├── output.tf
│ ├── registry.tf
│ ├── secrets.tf
│ ├── service_account.tf
│ └── variables.tf
└── README.md I tried to debug creating a new environment named terraform {
required_version = ">= 1.6.6"
cloud {
organization = "staysail"
workspaces {
name = "test"
}
}
required_providers {
google = {
source = "hashicorp/google"
version = "~> 5.9.0"
}
random = ">= 3.4.3"
}
}
module "staysail" {
source = "../../modules/staysail"
stage = "test"
is_prod = false
db_settings = {
tier = "db-custom-1-3840"
availability_type = "ZONAL"
retained_backups = 1
}
cr_api_settings = {
cpu = "1"
memory = "2048Mi"
cpu_throttling = false
min_scale = "0"
max_scale = "1"
}
polaris_version = "latest"
} The resource "google_compute_region_network_endpoint_group" "serverless_neg" {
project = var.project
provider = google-beta
name = "serverless-neg-${var.stage}"
network_endpoint_type = "SERVERLESS"
region = var.region
cloud_run {
service = google_cloud_run_v2_service.polaris.name
}
}
resource "google_artifact_registry_repository" "staysail" {
provider = google-beta
count = var.is_prod ? 1 : 0
location = var.region
repository_id = "staysail"
description = "staysail Registery"
format = "DOCKER"
cleanup_policy_dry_run = false
cleanup_policies {
id = "delete-week-old-latest"
action = "DELETE"
condition {
tag_state = "UNTAGGED"
older_than = "604800s"
}
}
}
I also use Global HTTP Load Balancer Terraform Module for Serverless NEGs, which uses module "gce-lb-http" {
source = "GoogleCloudPlatform/lb-http/google//modules/serverless_negs"
version = "~> 9.0"
...
}
The bug appeared after a I can push the full code on a public repo if it helps. Edit: I'm sorry, I just realized I didn't post the issue on the |
Hi @bourdeau if it is under your possibilities to share the full code please do it. Have you checked the past issues? |
A 32-bit system can only run a 32-bit binary but a 64-bit system can run either a 32-bit or 64-bit binary. This error generally happens when folks on an AMD64 system have accidentally installed an i386 binary- 32 bit systems are pretty rare nowadays. The big trap causing this to happen is on https://developer.hashicorp.com/terraform/install which lists i386/ARM before AMD64/ARM64 (and happens most commonly on Windows, where package managers are less ubiquitious. although that's not the case here): @bourdeau while your system is AMD64 as indicated by the x86_64 in your system version string, the Terraform binary you've downloaded is i386 (32-bit). In your original post see the results from
For an AMD64 binary you'd expect
You should be able to replace your binary w/ the AMD64 one. |
I reworked #6518 into a canonical issue, deduplicating. |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Community Note
modular-magician
user, it is either in the process of being autogenerated, or is planned to be autogenerated soon. If an issue is assigned to a user, that user is claiming responsibility for the issue. If an issue is assigned tohashibot
, a community member has claimed the issue already.Terraform Version
Terraform v1.6.6
on linux_386
Affected Resource(s)
all
Terraform Configuration Files
Debug Output
https://gist.github.com/bourdeau/22ed5d5a28b36d760632777e86a15f36
Panic Output
https://gist.github.com/bourdeau/22ed5d5a28b36d760632777e86a15f36
Expected Behavior
terraform plan
normal outputActual Behavior
Crashes because trying to cast "8580780465065941099" to int.
panic: Error reading level state: strconv.ParseInt: parsing "8580780465065941099": value out of range
Steps to Reproduce
terraform plan
Important Factoids
References
I didn't find any other issue related. Maybe I didn't look hard enough.
The text was updated successfully, but these errors were encountered: