error setting up OVH S3 as terraform backend
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 273
- Forks
- 391
- Avg merge
- 1m
- Merged PRs (30d)
- 1
Description
Hello,
I'm getting an error when setting OVH S3 as my terraform backend.
I followed this guide: https://help.ovhcloud.com/csm/en-public-cloud-compute-terraform-high-perf-object-storage-backend-state?id=kb_article_view&sysparm_article=KB0051345
Here is my config, copied from the guide.
I have proper access and secret keys, redacted here. It looks like it was able to fetch the state but it can't write it.
# backend.tf
terraform {
backend "s3" {
bucket = "terraform-state-gaugendre"
key = "terraform.tfstate"
region = "gra"
endpoints = {
s3 = "https://s3.gra.io.cloud.ovh.net/"
}
skip_credentials_validation = true
skip_region_validation = true
skip_requesting_account_id = true
skip_s3_checksum = true
access_key = "xx"
secret_key = "xx"
}
}
$ terraform init
Initializing the backend...
Do you want to copy existing state to the new backend?
Pre-existing state was found while migrating the previous "local" backend to the
newly configured "s3" backend. No existing state was found in the newly
configured "s3" backend. Do you want to copy this state to the new "s3"
backend? Enter "yes" to copy and "no" to start with an empty state.
Enter a value: yes
╷
│ Error: Error copying state from the previous "local" backend to the newly configured
│ "s3" backend:
│ failed to upload state: operation error S3: PutObject, https response error StatusCode: 400, RequestID: txdd5953c297c4485db41d1-0067fa53d5, HostID: txdd5953c297c4485db41d1-0067fa53d5, api error InvalidArgument: Invalid Argument.
│
│ The state in the previous backend remains intact and unmodified. Please resolve
│ the error above and try again.
│
│
╵
$ terraform -version
Terraform v1.11.3
on darwin_arm64
+ provider registry.terraform.io/ovh/ovh v2.1.0
I tried to contact the support using the big shiny button but they told me that they don't offer support for this.
I found #5430 discussing a similar issue but the workarounds mentioned seem already integrated in the guide.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the linked OVH Terraform backend guide and issue #5430, then reproduce the failure with the backend.tf configuration and Terraform v1.11.3. Determine whether the guide or related documentation needs correction; the work is done when the documented setup successfully writes state or the limitation and workaround are clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- terraform
- Domain
- cloud, documentation
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100