Skip to content

v1.11.2 - S3 backend use_lockfile option no longer works with an OCI Bucket #36742

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

Closed
lantins opened this issue Mar 20, 2025 · 4 comments
Closed
Labels
backend/s3 bug new new issue not yet triaged

Comments

@lantins
Copy link

lantins commented Mar 20, 2025

Terraform Version

Terraform v1.11.2
on darwin_arm64
+ provider registry.terraform.io/hashicorp/external v2.3.4
+ provider registry.terraform.io/hashicorp/tls v4.0.6
+ provider registry.terraform.io/oracle/oci v6.31.0

Terraform Configuration Files

#
# The following environment variables are expected to be set:
#   - AWS_ACCESS_KEY_ID
#   - AWS_SECRET_ACCESS_KEY
#
terraform {
  backend "s3" {
    bucket = "global-infra---terraform-state"
    key    = "terraform.tfstate"
    region = "us-ashburn-1"

    use_lockfile   = true
    use_path_style = true

    skip_region_validation      = true
    skip_credentials_validation = true
    skip_requesting_account_id  = true
    skip_s3_checksum            = true
    skip_metadata_api_check     = true

    endpoints = {
      s3 = "https://aaabbbcccddd.compat.objectstorage.us-ashburn-1.oraclecloud.com"
    }
  }
}

Debug Output

https://gist.github.com/lantins/036660d70d8f60210dae3148d1677a9e

Expected Behavior

Terraform should be able to acquire the lock, even when the S3 Backend is configured to use a OCI Bucket.

Actual Behavior

Terraform returns the following error:

api error InvalidArgument: x-amz-content-sha256 must be UNSIGNED-PAYLOAD or a valid sha256 value

Steps to Reproduce

  1. terraform init
  2. terraform plan

Additional Context

The use_lockfile feature works with an OCI Bucket when using Terraform v1.10.5

References

No response

Generative AI / LLM assisted development?

No response

@lantins lantins added bug new new issue not yet triaged labels Mar 20, 2025
@crw
Copy link
Contributor

crw commented Mar 20, 2025

This looks like a dupe of #36704, or at least the same cause. If you think this is a unique issue, let me know and I will re-open. Thanks!

@crw crw closed this as completed Mar 20, 2025
@crw crw added the backend/s3 label Mar 20, 2025
@lantins
Copy link
Author

lantins commented Mar 21, 2025

@crw Yup I'd agree, I tested v1.11.1 and everything worked as expected.

Thanks for linking this, I did try to find a similar/existing issue, but your GitHub foo is stronger then mine :)

@lantins
Copy link
Author

lantins commented Mar 21, 2025

Sorry, didn't realise I unlinked the duplicate you set.

@crw
Copy link
Contributor

crw commented Mar 21, 2025

No worries! And I see every issue in this repo, so I also just remember when I've seen similar issues. :D

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

No branches or pull requests

2 participants