Skip to content

Commit 4157b90

Browse files
authored
feat: add the region in variables and explain how to show the list of existing regions (#91)
1 parent 545fe09 commit 4157b90

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

storage/s3-with-tf/README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ export AWS_ACCESS_KEY_ID="<your_access_key>"
77
export AWS_SECRET_ACCESS_KEY="<your_secret_access_key>"
88
```
99

10+
To define the region (depending on our needs), follow this guide:
11+
https://help.ovhcloud.com/csm/en-gb-public-cloud-storage-s3-location?id=kb_article_view&sysparm_article=KB0047382
12+
13+
And then update the region variable in the `variables.tf` file.
1014

1115
Run the TF command `terraform apply`:
1216
```bash

storage/s3-with-tf/provider.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ terraform {
88

99
# Configure the AWS Provider
1010
provider "aws" {
11-
region = "gra"
11+
region = "${var.region}"
1212

1313
# OVH implementation has no STS service
1414
skip_credentials_validation = true
1515
skip_requesting_account_id = true
1616
# the gra region is unknown to AWS hence skipping is needed.
1717
skip_region_validation = true
1818
endpoints {
19-
s3 = "https://s3.gra.io.cloud.ovh.net"
19+
s3 = "https://s3.${var.region}.io.cloud.ovh.net"
2020
}
2121
}

storage/s3-with-tf/variables.tf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
variable "region" {
2+
default = "gra"
3+
}

0 commit comments

Comments
 (0)