-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Invalid AWS Region when creating S3 backend in mx-central-1 region #36624
Copy link
Copy link
Closed
Labels
Description
Terraform Version
Terraform v1.11.0
on darwin_arm64Terraform Configuration Files
terraform {
backend "s3" {
bucket = "samplebucket"
key = "terraform-state"
region = "mx-central-1"
}
}Debug Output
TF_LOG=trace terraform init
2025-03-04T00:14:19.280-0600 [INFO] Terraform version: 1.11.0
2025-03-04T00:14:19.281-0600 [DEBUG] using github.com/hashicorp/go-tfe v1.70.0
2025-03-04T00:14:19.281-0600 [DEBUG] using github.com/hashicorp/hcl/v2 v2.23.0
2025-03-04T00:14:19.281-0600 [DEBUG] using github.com/hashicorp/terraform-svchost v0.1.1
2025-03-04T00:14:19.281-0600 [DEBUG] using github.com/zclconf/go-cty v1.16.0
2025-03-04T00:14:19.281-0600 [INFO] Go runtime version: go1.23.3
2025-03-04T00:14:19.281-0600 [INFO] CLI args: []string{"terraform", "init"}
2025-03-04T00:14:19.281-0600 [TRACE] Stdout is a terminal of width 93
2025-03-04T00:14:19.281-0600 [TRACE] Stderr is a terminal of width 93
2025-03-04T00:14:19.281-0600 [TRACE] Stdin is a terminal
2025-03-04T00:14:19.281-0600 [DEBUG] Attempting to open CLI config file: /Users/sebastian/.terraformrc
2025-03-04T00:14:19.281-0600 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2025-03-04T00:14:19.282-0600 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2025-03-04T00:14:19.282-0600 [DEBUG] ignoring non-existing provider search directory /Users/sebastian/.terraform.d/plugins
2025-03-04T00:14:19.282-0600 [DEBUG] ignoring non-existing provider search directory /Users/sebastian/Library/Application Support/io.terraform/plugins
2025-03-04T00:14:19.282-0600 [DEBUG] ignoring non-existing provider search directory /Library/Application Support/io.terraform/plugins
2025-03-04T00:14:19.285-0600 [INFO] CLI command args: []string{"init"}
Initializing the backend...
2025-03-04T00:14:19.288-0600 [TRACE] Meta.Backend: built configuration for "s3" backend with hash value 1519931300
2025-03-04T00:14:19.288-0600 [TRACE] Meta.Backend: backend has not previously been initialized in this working directory
2025-03-04T00:14:19.288-0600 [TRACE] Meta.Backend: moving from default local state only to "s3" backend
2025-03-04T00:14:19.289-0600 [DEBUG] checking for provisioner in "."
2025-03-04T00:14:19.292-0600 [DEBUG] checking for provisioner in "/opt/homebrew/bin"
2025-03-04T00:14:19.292-0600 [TRACE] backend/local: state manager for workspace "default" will:
- read initial snapshot from terraform.tfstate
- write new snapshots to terraform.tfstate
- create any backup at terraform.tfstate.backup
2025-03-04T00:14:19.292-0600 [TRACE] statemgr.Filesystem: reading initial snapshot from terraform.tfstate
2025-03-04T00:14:19.293-0600 [TRACE] statemgr.Filesystem: snapshot file has nil snapshot, but that's okay
2025-03-04T00:14:19.293-0600 [TRACE] statemgr.Filesystem: read nil snapshot
2025-03-04T00:14:19.293-0600 [TRACE] Meta.Backend: ignoring local "default" workspace because its state is empty
╷
│ Error: Invalid region value
│
│ on main.tf line 5, in terraform:
│ 5: region = "mx-central-1"
│
│ Invalid AWS Region: mx-central-1
Expected Behavior
The backend should be configured to use the specified S3 bucket
Actual Behavior
╷
│ Error: Invalid region value
│
│ on main.tf line 5, in terraform:
│ 5: region = "mx-central-1"
│
│ Invalid AWS Region: mx-central-1
Steps to Reproduce
terraform init
Additional Context
No response
References
No response
Generative AI / LLM assisted development?
No response
Reactions are currently unavailable