Immutable solution version
S3 backend on nonAWS implementation (OCI) not working in 1.6.3
Complete solution
Shows how to fix s3 backend on nonAWS implementation (OCI) not working in 1.6.3. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Working S3-backend config for non-AWS (OCI) object storage on Terraform 1.7.4+: use the endpoints block and the skip flags, with the default credentials file and no env vars: backend "s3" { bucket = "..." key [your value] region = "eu-frankfurt-1" endpoints = { s3 = "https://YOUR-NAMESPACE.compat.objectstorage.eu-frankfurt-1.oraclecloud.com" } skip\credentials\validation = true skip\metadata\api\check = true skip\region\validation = true skip\requesting\account\id = true skip\s3\checksum = true use\path\style = true } Thread: https://github.com/hashicorp/terraform/issues/34053
Steps
- Working S3-backend config for non-AWS (OCI) object storage on Terraform 1.7.4+: use the
endpointsblock and the skip flags, with the default credentials file and no env vars:backend "s3" { bucket = "..." key [your value] region = "eu-frankfurt-1" endpoints = { s3 = "https://YOUR-NAMESPACE.compat.objectstorage.eu-frankfurt-1.oraclecloud.com" } skip_credentials_validation = true skip_metadata_api_check = true skip_region_validation = true skip_requesting_account_id = true skip_s3_checksum = true use_path_style = true }
When to use
You are seeing this: Terraform - ### Terraform Version `shell Terraform v1.6.1 on linux\_amd64 + provider registry.terraform.io/hashicorp/null v3.2.1 + provider registry.terraform.io/hashicorp/oci v5.9.0 + provider registry.terraform.io/oracle/oci v5.1.0 ` Use this skill when you run into "S3 backend on nonAWS implementation (OCI) not working in 1.6.3".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
Versions mentioned in the source: Terraform v1.6.1, v3.2.1, v5.9.0, v5.1.0, v1.5, Terraform 1.7.4. If you are on something much newer or older, the details may have shifted.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Sources
- https://YOUR-ID.compat.objectstorage.eu-frankfurt-1.oraclecloud.com"
- https://YOUR-NAMESPACE.compat.objectstorage.eu-frankfurt-1.oraclecloud.com"
- https://github.com/hashicorp/terraform/issues/34053
Evidence
In gh:hashicorp/terraform#34053 (https://github.com/hashicorp/terraform/issues/34053), the issue reported: ### Terraform Version ``shell Terraform v1.6.1 on linux_amd64 + provider registry.terraform.io/hashicorp/null v3.2.1 + provider registry.terraform.io/hashicorp/oci v5.9.0 + provider registry.terraform.io/oracle/oci v5.1.0 ### Terraform Configuration Files Config that worked in v1.5.x: tf backend "s3" { bucket = "[BUCKET]" key [your value] region = "eu-frankfurt-1" endpoint = "https://YOUR-ID.compat.objectstorage.eu-frankfurt-1.oraclecloud.com" shared_credentials_file = "PATH/TO/FILE" skip_region_validation = true skip_credentials_validation = true skip_metadata_api_check = true force_pa The verified answer: Working S3-backend config for non-AWS (OCI) object storage on Terraform 1.7.4+: use the endpoints block and the skip flags, with the default credentials file and no env vars: backend "s3" { bucket = "..." key [your value] region = "eu-frankfurt-1" endpoints = { s3 = "https://YOUR-NAMESPACE.compat.objectstorage.eu-frankfurt-1.oraclecloud.com" } skipcredentialsvalidation = true skipmetadataapicheck = true skipregionvalidation = true skiprequestingaccountid = true skips3checksum = true usepathstyle = true }`
By @issueatlas · Version 2 · Exact version
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_OReSZTwZCGmiCX6D_Fef1g" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">S3 backend on nonAWS implementation (OCI) not working in 1.6.3 <span>— Vectle</span></a>