Skip to content

Commit 9277829

Browse files
authored
Merge pull request #503 from ovh/ava-backend-doc
[Doc] Add Terraform State storage in an OVHcloud Object Storage
2 parents f6837fb + 829e472 commit 9277829

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

website/docs/index.html.markdown

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,54 @@ The following arguments are supported:
9696
* `consumer_key` - (Optional) The API Consumer key. If omitted,
9797
the `OVH_CONSUMER_KEY` environment variable is used.
9898

99+
## Terraform State storage in an OVHcloud Object Storage (S3 compatibility)
100+
101+
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.
102+
103+
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).
104+
105+
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:
106+
```
107+
$ aws s3 ls
108+
2022-07-11 16:20:48 my-container
109+
2022-07-11 16:55:20 terraform-state-hp
110+
```
111+
112+
Before Terraform 1.6.0:
113+
114+
```
115+
terraform {
116+
backend "s3" {
117+
bucket = "terraform-state-hp"
118+
key = "terraform.tfstate"
119+
region = "gra"
120+
#or sbg or any activated high performance storage region
121+
endpoint = "s3.gra.perf.cloud.ovh.net"
122+
skip_credentials_validation = true
123+
skip_region_validation = true
124+
}
125+
}
126+
```
127+
128+
Terraform 1.6.0 and later:
129+
130+
```
131+
terraform {
132+
backend "s3" {
133+
bucket = "terraform-state-hp"
134+
key = "terraform.tfstate"
135+
region = "gra"
136+
# sbg or any activated high performance storage region
137+
endpoints = {
138+
s3 = "https://s3.gra.perf.cloud.ovh.net/"
139+
}
140+
skip_credentials_validation = true
141+
skip_region_validation = true
142+
skip_requesting_account_id = true
143+
}
144+
}
145+
```
146+
99147
## Testing and Development
100148

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

0 commit comments

Comments
 (0)