Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

S3 Backend: Addition of content MD5 header while uploading the terraform state file to the bucket. #36382

Open
IBM-diksha opened this issue Jan 22, 2025 · 1 comment
Labels
backend/s3 enhancement new new issue not yet triaged

Comments

@IBM-diksha
Copy link

IBM-diksha commented Jan 22, 2025

Terraform Version

Terraform version > v1.6.0

Use Cases

Can the content MD5 header be added to the PutObject request when uploading the state file to the bucket with object lock enabled with s3 backend.

Attempted Solutions

While using the s3 backend to store the state file , terraform fails with following error -

Error saving state: failed to upload state: operation error S3: PutObject, https
│ response error StatusCode: 400, RequestID: 774feac6-432c-45ab-89c0-61b581e4c032,
│ HostID: , api error InvalidRequest: Content-MD5 HTTP header or AWS Signature Version
│ 4 signed payload is required for Put Object requests with Object Lock parameters

This is specifically happens if the bucket to which the state file has to uploaded has object lock enabled.

Proposal

No response

References

No response

@IBM-diksha IBM-diksha added enhancement new new issue not yet triaged labels Jan 22, 2025
@crw crw added the backend/s3 label Jan 22, 2025
@crw crw changed the title Addition of content MD5 header while uploading the terraform state file to the bucket. S3 Backend: Addition of content MD5 header while uploading the terraform state file to the bucket. Jan 22, 2025
@crw
Copy link
Contributor

crw commented Jan 22, 2025

Thanks for this report!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend/s3 enhancement new new issue not yet triaged
Projects
None yet
Development

No branches or pull requests

2 participants