Skip to content

Commit

Permalink
chore: Update Terraform initialization and workspace management in RE…
Browse files Browse the repository at this point in the history
…ADME files
  • Loading branch information
ulises-jeremias committed Jul 8, 2024
1 parent 872eb2e commit e3ede3c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 49 deletions.
26 changes: 2 additions & 24 deletions live/common-infra/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,37 +25,15 @@
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:

```sh
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:

Expand Down
25 changes: 2 additions & 23 deletions live/core-networking/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,36 +28,15 @@
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:

```sh
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:

Expand Down
4 changes: 2 additions & 2 deletions live/terraform-backend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:**
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit e3ede3c

Please sign in to comment.