|
1 | 1 | ---
|
2 | 2 | title: 'Using OVHcloud Object Storage as Terraform Backend to store your Terraform state (EN)'
|
3 | 3 | excerpt: 'Find out how to use an OVHcloud Object Storage as a Terraform Backend to store your Terraform state'
|
4 |
| -updated: 2023-07-31 |
| 4 | +updated: 2023-11-30 |
5 | 5 | ---
|
6 | 6 |
|
7 | 7 | ## Objective
|
@@ -77,16 +77,35 @@ $ aws s3 ls
|
77 | 77 |
|
78 | 78 | Create a `backend.tf` file with the following content:
|
79 | 79 |
|
| 80 | +Before Terraform version 1.6.0: |
80 | 81 | ```yaml
|
81 | 82 | terraform {
|
82 | 83 | backend "s3" {
|
83 | 84 | bucket = "terraform-state-hp"
|
84 | 85 | key = "terraform.tfstate"
|
85 | 86 | region = "gra"
|
86 |
| - #or sbg or any activated high performance storage region |
| 87 | + # sbg or any activated high performance storage region |
87 | 88 | endpoint = "s3.gra.perf.cloud.ovh.net"
|
88 | 89 | skip_credentials_validation = true
|
89 |
| - skip_region_validation = true |
| 90 | + skip_region_validation = true |
| 91 | + } |
| 92 | +} |
| 93 | +``` |
| 94 | + |
| 95 | +After Terraform version 1.6.0: |
| 96 | +```yaml |
| 97 | +terraform { |
| 98 | + backend "s3" { |
| 99 | + bucket = "terraform-state-hp" |
| 100 | + key = "terraform.tfstate" |
| 101 | + region = "gra" |
| 102 | + # sbg or any activated high performance storage region |
| 103 | + endpoints = { |
| 104 | + s3 = "https://s3.gra.perf.cloud.ovh.net/" |
| 105 | + } |
| 106 | + skip_credentials_validation = true |
| 107 | + skip_region_validation = true |
| 108 | + skip_requesting_account_id = true |
90 | 109 | }
|
91 | 110 | }
|
92 | 111 | ```
|
@@ -126,4 +145,4 @@ Now you can define your Terraform configuration files and providers and after ru
|
126 | 145 |
|
127 | 146 | ## Go further
|
128 | 147 |
|
129 |
| -Join our community of users on <https://community.ovh.com/en/>. |
| 148 | +Join our community of users on <https://community.ovh.com/en/>. |
0 commit comments