Loading...
Loading...
### Terraform Version ```shell Terraform v1.12.2 on darwin_arm64 ``` ### Terraform Configuration Files ```terraform terraform { required_providers { # OMITTED } backend "s3" { bucket = "test" key = "s3_backend.tfstate" skip_requesting_account_id = true skip_credentials_validation = true skip_metadata_api_check = true skip_region_validation = true skip_s3_checksum = true use_path_style = true region = "europe-1" endpoints = { s3 = "OMITTED" iam = "OMITTED" sts = "OMITTED" } access_key = "OMITTED" secret_key = "OMITTED" } } ``` ### Debug Output ``` ╷ │ Error: Failed to save state │ │ Error saving state: failed to upload state: operation error S3: PutObject, https response error StatusCode: 400, │ RequestID: 647e0207:19690c004ac:1455ba:313a, HostID: 1bcb8c63283b604944d404c7f8821545c943cd2624adb874cf8f13e53c4c3165, api │ error XAmzContentSHA256Mismatch: The Content-SHA256 you specified did not match what we received ╵ ``` ### Expected Behavior Content checksums are not validated when `skip_s3_checksum` is set to `true`. ### Actual Behavior `PutObject` call fails with `XAmzContentSHA256Mismatch` error. ### Steps to Reproduce Try to store state in a non-aws S3 service without disabling `request_checksum_calculation` and `response_checksum_validation` options in AWS config. ### Additional Context Storing the state works if `request_checksum_calculation` and `response_checksum_validation` options are set to `when_required` with environment variables: ```sh export AWS_REQUEST_CHECKSUM_CALCULATION=when_required export AWS_RESPONSE_CHECKSUM_VALIDATION=when_required ``` ### References See AWS announcement on default integrity checks: https://github.com/aws/aws-sdk-go-v2/discussions/2960 ### Generative AI / LLM assisted development? No
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.