Skip to content

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

Closed as duplicate of#36704
@lantins

Description

@lantins

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions