From e3ede3c6c499a372b7af5118beeb0a604d8ed90a Mon Sep 17 00:00:00 2001 From: ulises-jeremias Date: Mon, 8 Jul 2024 00:19:22 -0300 Subject: [PATCH] chore: Update Terraform initialization and workspace management in README files --- live/common-infra/README.md | 26 ++------------------------ live/core-networking/README.md | 25 ++----------------------- live/terraform-backend/README.md | 4 ++-- 3 files changed, 6 insertions(+), 49 deletions(-) diff --git a/live/common-infra/README.md b/live/common-infra/README.md index aecd9aa..307fb2f 100644 --- a/live/common-infra/README.md +++ b/live/common-infra/README.md @@ -25,29 +25,7 @@ tfswitch ``` -2. **Check the Terraform Backend Configuration:** - - Verify that the backend configuration is set correctly in the `backend.tf` file. - - ```hcl - terraform { - required_version = ">= 1.0.0" - - backend "s3" { - region = "us-west-2" - bucket = "terraform-state" - key = "terraform.tfstate" - dynamodb_table = "terraform-state-lock" - profile = "" - encrypt = "true" - } - } - - ``` - - Replace the placeholder values with the actual bucket name, key, region, and DynamoDB table name. - -3. **Initialize Terraform:** +2. **Initialize Terraform:** Initialize the working directory with the required providers and modules: @@ -55,7 +33,7 @@ terraform init -backend-config="./configs/prod-backend.tfvars" ``` -4. **Workspace Management:** +3. **Workspace Management:** Select or create a new workspace tailored to your deployment environment: diff --git a/live/core-networking/README.md b/live/core-networking/README.md index 1967367..13110dc 100644 --- a/live/core-networking/README.md +++ b/live/core-networking/README.md @@ -28,28 +28,7 @@ tfswitch ``` -2. **Check the Terraform Backend Configuration:** - - Verify that the backend configuration is set correctly in the `backend.tf` file. - - ```hcl - terraform { - required_version = ">= 1.0.0" - - backend "s3" { - region = "us-west-2" - bucket = "terraform-state" - key = "terraform.tfstate" - dynamodb_table = "terraform-state-lock" - profile = "" - encrypt = "true" - } - } - ``` - - Replace the placeholder values with the actual bucket name, key, region, and DynamoDB table name. - -3. **Initialize Terraform:** +2. **Initialize Terraform:** Initialize the working directory with the required providers and modules: @@ -57,7 +36,7 @@ terraform init -backend-config="./configs/prod-backend.tfvars" ``` -4. **Workspace Management:** +3. **Workspace Management:** Select or create a new workspace tailored to your deployment environment: diff --git a/live/terraform-backend/README.md b/live/terraform-backend/README.md index 0c2b569..234aebc 100644 --- a/live/terraform-backend/README.md +++ b/live/terraform-backend/README.md @@ -20,7 +20,7 @@ Initialize the working directory with the required providers and modules: ```sh - terraform init -backend-config="./configs/prod-backend.tfvars" + terraform init ``` 4. **Workspace Management:** @@ -66,7 +66,7 @@ If this is your first deployment, Terraform will prompt you to confirm the setup If migrating from a local state, use the following command to migrate the state to the S3 bucket safely: ```sh - terraform init -force-copy + terraform init -backend-config="./configs/prod-backend.tfvars" -force-copy ``` Push the changes to your version control system: