Object storage backend on OVH with terraform

When configuring the swift backend for terraform using OVH, I ran in to the following error:

Error: No suitable endpoint could be found in the service catalog

I was using a pretty standard configuration

terraform {
  required_version = ">= 0.14.0"
  backend "swift" {
    container         = "terraform-state"
    archive_container = "terraform-state-archive"
  }
}

Exactly as the documentation states, here. This is caused by a problem alluded to in the comment of this issue on github. As I was using the same configuration for my resources as my backend through environment variables, I too was trying to access swift using UK1 as the region where it should have been UK

The fix:

terraform {
  required_version = ">= 0.14.0"
  backend "swift" {
    container         = "terraform-state"
    archive_container = "terraform-state-archive"
    region_name       = "UK"
  }
}


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: