Skip to content

The S3 backend does not yet recognise New Zealand region ap-southeast-6 #37771

@terencewhitenz

Description

@terencewhitenz

Terraform Version

Terraform v1.14.0-beta2
on linux_amd64
also present in latest non-beta release
Terraform v1.13.3
on linux_amd64

Terraform Configuration Files

terraform {
  required_version = "~> 1.13"
  required_providers {
    aws = {
      source  = "hashicorp/aws"
      version = "~> 6.0"
    }
  }
  backend "s3" {
    bucket = "s3bucketnamethatexists"
    key = "state"
    region = "ap-southeast-6"
    use_lockfile = true
  }
}

Debug Output

2025-10-15T13:13:29.081+1300 [INFO]  Terraform version: 1.14.0 beta2
2025-10-15T13:13:29.081+1300 [DEBUG] using github.com/hashicorp/go-tfe v1.91.0
2025-10-15T13:13:29.081+1300 [DEBUG] using github.com/hashicorp/hcl/v2 v2.24.0
2025-10-15T13:13:29.081+1300 [DEBUG] using github.com/hashicorp/terraform-svchost v0.1.1
2025-10-15T13:13:29.081+1300 [DEBUG] using github.com/zclconf/go-cty v1.16.3
2025-10-15T13:13:29.081+1300 [INFO]  Go runtime version: go1.25.1
2025-10-15T13:13:29.081+1300 [INFO]  CLI args: []string{"terraform", "init", "--backend-config=backend.tf.infra-platform", "--reconfigure"}
2025-10-15T13:13:29.081+1300 [TRACE] Stdout is a terminal of width 158
2025-10-15T13:13:29.081+1300 [TRACE] Stderr is a terminal of width 158
2025-10-15T13:13:29.081+1300 [TRACE] Stdin is a terminal
2025-10-15T13:13:29.081+1300 [DEBUG] Attempting to open CLI config file: /home/ec2-user/.terraformrc
2025-10-15T13:13:29.081+1300 [DEBUG] File doesn't exist, but doesn't need to. Ignoring.
2025-10-15T13:13:29.081+1300 [DEBUG] ignoring non-existing provider search directory terraform.d/plugins
2025-10-15T13:13:29.082+1300 [DEBUG] ignoring non-existing provider search directory /home/ec2-user/.terraform.d/plugins
2025-10-15T13:13:29.082+1300 [DEBUG] ignoring non-existing provider search directory /home/ec2-user/.local/share/terraform/plugins
2025-10-15T13:13:29.082+1300 [DEBUG] ignoring non-existing provider search directory /usr/local/share/terraform/plugins
2025-10-15T13:13:29.082+1300 [DEBUG] ignoring non-existing provider search directory /usr/share/terraform/plugins
2025-10-15T13:13:29.082+1300 [INFO]  CLI command args: []string{"init", "--backend-config=backend.tf.infra-platform", "--reconfigure"}
Initializing the backend...
2025-10-15T13:13:29.090+1300 [TRACE] Meta.Backend: merging -backend-config=... CLI overrides into backend configuration
2025-10-15T13:13:29.090+1300 [TRACE] Meta.Backend: built configuration for "s3" backend with hash value 1410938009
2025-10-15T13:13:29.090+1300 [TRACE] Meta.Backend: backend has not previously been initialized in this working directory
2025-10-15T13:13:29.090+1300 [TRACE] Meta.Backend: moving from default local state only to "s3" backend
2025-10-15T13:13:29.091+1300 [DEBUG] checking for provisioner in "."
2025-10-15T13:13:29.091+1300 [DEBUG] checking for provisioner in "/home/ec2-user"
2025-10-15T13:13:29.091+1300 [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-10-15T13:13:29.091+1300 [TRACE] statemgr.Filesystem: reading initial snapshot from terraform.tfstate
2025-10-15T13:13:29.091+1300 [TRACE] statemgr.Filesystem: snapshot file has nil snapshot, but that's okay
2025-10-15T13:13:29.091+1300 [TRACE] statemgr.Filesystem: read nil snapshot
2025-10-15T13:13:29.091+1300 [TRACE] Meta.Backend: ignoring local "default" workspace because its state is empty
╷
│ Error: Invalid region value
│
│   on terraform.tf line 11, in terraform:
│   11:   backend "s3" {
│
│ Invalid AWS Region: ap-southeast-6
╵

Expected Behavior

Terraform should have initialised as the bucket exists in the region and terraform is run with admin credentials. This works with a bucket in another region (ap-southeast-2).

$ aws s3api get-bucket-location --bucket s3bucketnamethatexists
{
    "LocationConstraint": "ap-southeast-6"
}

Actual Behavior

Terraform throws an error that it does not recognise the region

│ Error: Invalid region value
│
│   on terraform.tf line 11, in terraform:
│   11:   backend "s3" {
│
│ Invalid AWS Region: ap-southeast-6
╵

Steps to Reproduce

  1. terraform init

Additional Context

The New Zealand region opened a month and a half ago.

References

hashicorp/terraform-provider-aws#44637 is the same issue raised against the AWS Provider. I think this is an S3 backend issue rather than an AWS Provider issue.

Generative AI / LLM assisted development?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions