Skip to content

[Doc] Add Terraform State storage in an OVHcloud Object Storage #503

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions website/docs/index.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,54 @@ The following arguments are supported:
* `consumer_key` - (Optional) The API Consumer key. If omitted,
the `OVH_CONSUMER_KEY` environment variable is used.

## Terraform State storage in an OVHcloud Object Storage (S3 compatibility)

In order to store your Terraform states on an Object Storage, and generally if you want to interact with the Object Storage, you need to have the rights to manage an Object Storage.

You should already have a [High Performance Object Storage container and a user](https://help.ovhcloud.com/csm/en-public-cloud-compute-terraform-high-perf-object-storage-backend-state?id=kb_article_view&sysparm_article=KB0051345).

You should also be able to interact with the `aws` CLI and list the OVHcloud High Performance Object Storage containers that the user is linked to:
```
$ aws s3 ls
2022-07-11 16:20:48 my-container
2022-07-11 16:55:20 terraform-state-hp
```

Before Terraform 1.6.0:

```
terraform {
backend "s3" {
bucket = "terraform-state-hp"
key = "terraform.tfstate"
region = "gra"
#or sbg or any activated high performance storage region
endpoint = "s3.gra.perf.cloud.ovh.net"
skip_credentials_validation = true
skip_region_validation = true
}
}
```

Terraform 1.6.0 and later:

```
terraform {
backend "s3" {
bucket = "terraform-state-hp"
key = "terraform.tfstate"
region = "gra"
# sbg or any activated high performance storage region
endpoints = {
s3 = "https://s3.gra.perf.cloud.ovh.net/"
}
skip_credentials_validation = true
skip_region_validation = true
skip_requesting_account_id = true
}
}
```

## Testing and Development

In order to run the Acceptance Tests for development, the following environment
Expand Down