Loading...
Loading...
### Terraform Version ```shell 1.11.2 and later ``` ### Terraform Configuration Files Showing here just the Terraform S3 backend configuration. ```terraform terraform { backend "s3" { endpoints = { s3 = ""} shared_credentials_files = ["./.tf-s3-creds"] bucket = "$CONTAINER_NAME" use_path_style = true key = "terraform.tfstate" workspace_key_prefix = "" 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. * https://docs.ceph.com/en/latest/radosgw/ * https://docs.ceph.com/en/quincy/radosgw/s3/ ### References This issue is related to https://github.com/hashicorp/terraform/pull/36625 change. ### Generative AI / LLM assisted development? _No response_
Click on a version to see all relevant bugs
Terraform Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.