Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

Commit

Permalink
Merge pull request #28 from LF-Engineering/update-terraform-path
Browse files Browse the repository at this point in the history
Update the terraform path & add readme
  • Loading branch information
linonymous authored Jan 28, 2022
2 parents fb07a8a + 068fedf commit 099bc6d
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
10 changes: 10 additions & 0 deletions deploy/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
###### Terraform FAQs


- whenever the [backend](https://github.com/LF-Engineering/insights-datasource-shared/blob/main/deploy/dev/main.tf#L8) is changed please use following commands locally to migrate the backend first

`terraform init -migrate-state` & check with `terraform plan` if the new configuration is correctly migrated.

- if the [backend](https://github.com/LF-Engineering/insights-datasource-shared/blob/main/deploy/dev/main.tf#L8) is not setup, initially initialize it locally using following command

`terraform init`
2 changes: 1 addition & 1 deletion deploy/dev/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ provider "aws" {
terraform {
backend "s3" {
bucket = "insights-v2-dev"
key = "terraform/terraform.tfstate"
key = "terraform/connector-ecs-tasks/terraform.tfstate"
region = "us-east-2" # this cant be replaced with the variable
encrypt = true
kms_key_id = "alias/terraform-bucket-key"
Expand Down
2 changes: 1 addition & 1 deletion deploy/prod/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ provider "aws" {
terraform {
backend "s3" {
bucket = "insights-v2-dev"
key = "terraform/terraform.tfstate"
key = "terraform/connector-ecs-tasks/terraform.tfstate"
region = "us-east-2" # this cant be replaced with the variable
encrypt = true
kms_key_id = "alias/terraform-bucket-key"
Expand Down
2 changes: 1 addition & 1 deletion deploy/test/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ provider "aws" {
terraform {
backend "s3" {
bucket = "insights-v2-dev"
key = "terraform/terraform.tfstate"
key = "terraform/connector-ecs-tasks/terraform.tfstate"
region = "us-east-2" # this cant be replaced with the variable
encrypt = true
kms_key_id = "alias/terraform-bucket-key"
Expand Down

0 comments on commit 099bc6d

Please sign in to comment.