8000 Regression for certain third-party S3 backends over S3 v2 API as of 1.11.2 (ceph, hetzner) · Issue #37130 · hashicorp/terraform · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Regression for certain third-party S3 backends over S3 v2 API as of 1.11.2 (ceph, hetzner) #37130
Open
@freznicek

Description

@freznicek

Terraform Version

1.11.2 and later

Terraform Configuration Files

Showing here just the Terraform S3 backend configuration.

 terraform { 
  backend "s3" {
    endpoints =                 { s3 = "<url>"}
    shared_credentials_files    = ["./.tf-s3-creds"]
    bucket                      = "$CONTAINER_NAME"
    use_path_style              = true
    key                         = "terraform.tfstate"
    workspace_key_prefix        = "<ostack-container-name>"
    region                      = "<ostack-region>"
    skip_credentials_validation = true
    skip_region_validation      = true
    skip_requesting_account_id  = true
    skip_metadata_api_check     = true
    skip_s3_checksum            = true
  }
} 

Debug Output

│ Error: failed to upload state: operation error S3: PutObject, https response error StatusCode: 400, RequestID: tx00000a93590afd2885bfb-0068232994-e806fab1-cloud-ceph-objectstore-prod-brno, HostID: e806fab1-cloud-ceph-objectstore-prod-brno-cloud-ceph-objectstore-prod-brno, api error XAmzContentSHA256Mismatch: UnknownError

Expected Behavior

I understand S3 v2 API is not the recent one and maybe should not be enabled by default.

On the other side I believe this behavior is regression and there has to be decision from Terraform community whether to support S3 v2 API. I'd propose to additional parameter to S3 backend enforcing S3 v2 API.

Actual Behavior

Unable to push terraform state to S3 backend over S3 v2 API. Fails with:

│ Error: failed to upload state: operation error S3: PutObject, https response error StatusCode: 400, RequestID: tx00000a93590afd2885bfb-0068232994-e806fab1-cloud-ceph-objectstore-prod-brno, HostID: e806fab1-cloud-ceph-objectstore-prod-brno-cloud-ceph-objectstore-prod-brno, api error XAmzContentSHA256Mismatch: UnknownError

Steps to Reproduce

  1. Let's have S3 backend available based ceph rados-gateway
  2. Terraform infrastructure uses s3 backend
  3. Classical terraform workflow start to fail (since Terraform 1.11.2)
  4. terraform init
  5. terraform validate
  6. terraform plan -out plan
  7. terraform apply plan

Additional Context

On prem clouds with ceph distributed storage backends still use ceph rados gateway for Swift / S3 object-store offerings.

References

This issue is related to #36625 change.

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

      0