Hi,
I have an error with a S3 backend with an internal Ceph storage: “api error XAmzContentSHA256Mismatch” when I run a terraform command.
My config:
terraform {
required_version = ">= 1.6.0"
backend "s3" {
bucket = "maq-tf"
use_path_style = true
encrypt = true
key = "maq-ca-01"
skip_credentials_validation = true
skip_region_validation = true
skip_requesting_account_id = true
}
}
and env:
export TF_TOKEN_gitlab_my_domain="${CI_JOB_TOKEN:-$GITLAB_ACCESS_TOKEN}"
export AWS_ENDPOINT_URL_S3="https://my.s3.ceph.endpoint.com"
export AWS_REGION="myregion"
export AWS_ACCESS_KEY_ID="U147GACCESSKEYID"
export AWS_SECRET_ACCESS_KEY="szevNooRisecretaccesskey"
export AWS_SSE_CUSTOMER_KEY="Ep0UhppA+cC9Lvabase64encodedkey="
The SSE key is generated with:
openssl rand -base64 32
Of course, my bucket is configured for encryption:
# aws s3api get-bucket-encryption --bucket maq-tf
ServerSideEncryptionConfiguration:
Rules:
- ApplyServerSideEncryptionByDefault:
SSEAlgorithm: AES256
What am I missing ?
Thanks you