-
Notifications
You must be signed in to change notification settings - Fork 383
Open
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.
Metadata
Metadata
Assignees
Labels
No labels