Comments (5)
Generally speaking, value out of range errors happen due to running on a 32-bit system....
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 terraform -v
:
Terraform v1.6.6
on linux_386
For an AMD64 binary you'd expect linux_amd64
. This is from my system where I'm using Terraform 1.5.2
:
Terraform v1.5.2
on linux_amd64
You should be able to replace your binary w/ the AMD64 one.
from terraform-provider-google.
Generally speaking, value out of range
errors happen due to running on a 32-bit system - here are some open (and closed) tickets with similar errors in the past: https://github.com/hashicorp/terraform-provider-google/issues?q=is%3Aissue+is%3Aopen+%22value+out+of+range%22
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!
from terraform-provider-google.
@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 (Linux ph-corsair 6.5.0-14-generic #14-Ubuntu SMP PREEMPT_DYNAMIC Tue Nov 14 14:59:49 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
)
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 test
which contains exactly the same config as preprod
:
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 google-beta
resources I use are the following:
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 google-beta
:
module "gce-lb-http" {
source = "GoogleCloudPlatform/lb-http/google//modules/serverless_negs"
version = "~> 9.0"
...
}
terraform plan
in the new test
environment went absolutely fine. The bug only occurs in existing terraform states (prod
and preprod
).
The bug appeared after a terraform init -upgrade
, no changes made.
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 google-beta
repository. Do you want me to open it there?
from terraform-provider-google.
Hi @bourdeau if it is under your possibilities to share the full code please do it. Have you checked the past issues?
What are you trying to parse and where is it?
from terraform-provider-google.
I reworked #6518 into a canonical issue, deduplicating.
from terraform-provider-google.
Related Issues (20)
- Failing test(s): TestAccKMSEkmConnection_kmsEkmConnectionBasicExample_update HOT 4
- Error importing Cloud Armor policy into terraform HOT 9
- Add a data source for App Hub Application HOT 1
- New resource for Workload in Apphub HOT 1
- Enable --tls-san configuration on google_container_cluster HOT 1
- Terraform support for Wildcard Path Matching and Rewrites of Regional HTTP(S) Load Balancers
- Document creating inline projects in test authoring guide
- Add support for `sql_network_architecture` in CloudSQL instances HOT 1
- Add arguments to pass document parsing and chunking options to google_discovery_engine_data_store HOT 1
- Project sweeper can fail due to liens HOT 2
- BigQuery recreate nested schema HOT 1
- Issue using local_nvme_ssd_block_config HOT 1
- Validation should know that google_monitoring_alert_policy periods can only be defined in seconds HOT 5
- Manage Application Integration Clients through terraform HOT 1
- Cannot set Autoscaling Algorithm to `THROUGHPUT_BASED` HOT 12
- resource_compute_(region)_instance_group_manager does have a documentation issue wrt. status.stateful message HOT 4
- google_cloudbuild_trigger requires the property repo_type but there is no value for Bitbucket Cloud? HOT 2
- Adding a way to list tag keys and tag values in a project HOT 1
- Add breaking change detection for the case adding `max_size` HOT 4
- Output-only fields are included in Update requests HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from terraform-provider-google.