Open
Description
Terraform Version
Terraform v1.11.2
on linux_amd64
+ provider registry.terraform.io/digitalocean/digitalocean v2.49.1
Use Cases
Using "S3 compatible" apis (specifically Backblaze in my case), where the api doesn't support the x-amz-checksum-mode
header.
Attempted Solutions
Using version 1.11.1 (which works as expected). Something changed in 1.11.2 which "broke" this, however I was not able to find any changes between the versions that look like they would cause this changed behavior.
Proposal
The documentation https://developer.hashicorp.com/terraform/language/backend/s3#skip_s3_checksum indicates that skip_s3_checksum
only applies to uploading. My proposal is that it also applies to the GetObject
action. As mentioned before, I have no issue with 1.11.1, but in 1.11.2 running terraform init
returns an error:
Error: Error refreshing state: Unable to access object "terraform.tfstate" in S3 bucket "<snip>": operation error S3: GetObject, https response error StatusCode: 400, RequestID: <snip>, HostID: <snip>, api error InvalidArgument: Unsupported header 'x-amz-checksum-mode' received for this API call.
For reference, my backend block is:
terraform {
backend "s3" {
endpoints = {
s3 = "https://s3.us-west-004.backblazeb2.com"
}
skip_credentials_validation = true
skip_metadata_api_check = true
skip_region_validation = true
skip_requesting_account_id = true
region = "us-east-1"
bucket = "<snip>"
key = "terraform.tfstate"
skip_s3_checksum = true
}
}
References
No response