Skip to content

Commit

Permalink
bump project configs part 3
Browse files Browse the repository at this point in the history
  • Loading branch information
coilysiren committed Jun 1, 2024
1 parent 2ba2180 commit 27e69ef
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,15 @@ Create a terraform state bucket via https://console.cloud.google.com/, then set

```yaml
# config.yml
bucket: coilysiren-k8s-gpc-tfstate-3
bucket: coilysiren-k8s-gpc-tfstate-5
```
Then you must set its name manually in every `state.tf` file. Open every `state.tf` file in the repo. You will see a block like this:

```hcl
terraform {
backend "gcs" {
bucket = "coilysiren-k8s-gpc-tfstate-3"
bucket = "coilysiren-k8s-gpc-tfstate-5"
prefix = "terraform/state"
}
}
Expand All @@ -143,7 +143,7 @@ Finally, import you import the bucket into terraform.
# $SHELL
$ cd infrastructure/foundation/
$ terraform init
$ terraform import google_storage_bucket.default coilysiren-k8s-gpc-tfstate-3
$ terraform import google_storage_bucket.default coilysiren-k8s-gpc-tfstate-5
```

Note that, when you deploy in the next step, you might have to modify the state bucket's region. The goal is to avoid replacing the state bucket.
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/application/state.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
terraform {
backend "gcs" {
bucket = "coilysiren-k8s-gpc-tfstate-3"
bucket = "coilysiren-k8s-gpc-tfstate-5"
prefix = "terraform/state/application"
}
}
Expand Down
2 changes: 1 addition & 1 deletion infrastructure/ingress/state.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
terraform {
backend "gcs" {
bucket = "coilysiren-k8s-gpc-tfstate-3"
bucket = "coilysiren-k8s-gpc-tfstate-5"
prefix = "terraform/state/ingress"
}
}
Expand Down

0 comments on commit 27e69ef

Please sign in to comment.