From 6f6b3edac5659ec9037ab68b7e6e0c9c90eda6fd Mon Sep 17 00:00:00 2001 From: Alis Akers Date: Mon, 4 Nov 2024 12:09:11 -0800 Subject: [PATCH] update docs to include suggestions for directory/environment management --- .github/workflows/deployment_apply.yaml | 3 +++ .github/workflows/deployment_plan.yaml | 3 +++ README.md | 7 ++++--- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deployment_apply.yaml b/.github/workflows/deployment_apply.yaml index b9f885e..465f33f 100644 --- a/.github/workflows/deployment_apply.yaml +++ b/.github/workflows/deployment_apply.yaml @@ -31,6 +31,9 @@ jobs: defaults: run: shell: bash + # this may need to be updated if you change the directory you are working with + # ./terraform/implementation/dev || ./terraform/implementation/prod for example + # this practice is recommended to keep the terraform code organized while reducing the risk of conflicts working-directory: ./terraform/implementation/ecs steps: - name: Check Out Changes diff --git a/.github/workflows/deployment_plan.yaml b/.github/workflows/deployment_plan.yaml index 9519cea..7b58332 100644 --- a/.github/workflows/deployment_plan.yaml +++ b/.github/workflows/deployment_plan.yaml @@ -31,6 +31,9 @@ jobs: defaults: run: shell: bash + # this may need to be updated if you change the directory you are working with + # ./terraform/implementation/dev || ./terraform/implementation/prod for example + # this practice is recommended to keep the terraform code organized while reducing the risk of conflicts working-directory: ./terraform/implementation/ecs steps: - name: Check Out Changes diff --git a/README.md b/README.md index fc00f25..1ed6272 100644 --- a/README.md +++ b/README.md @@ -193,9 +193,10 @@ The setup.sh script will create the following files: ## 4.6 Run Terraform Code In Your Designated Environment 4.6.1. Run ECS Module Locally -* To run your ECS Module Changes in your local terminal, navigate to _terraform/implementation/ecs/_ and run the following command: `cd /terraform/implementation`. +* It is highly recommended to create a new directory per environment that is launched, to do so run `cp terraform/implementation/ecs terraform/implementation/{insertEnvironmentName}`. +* To run your ECS Module Changes in your local terminal, navigate to your working directory, ` cd terraform/implementation/ecs/` or `cd terraform/implementation/{insertEnvironmentName}` * In your terminal run the deploy script for your designated environment `./deploy.sh -e {insertEnvironmentName}`.\ -    Note: The _-e_ tag stands for environment and you can specify `dev`, `stage`, `prod` +    Note: The _-e_ tag stands for environment and you can specify `dev`, `stage`, `prod`, this can match your environment naming convention.     or whatever environment your team desires. [Return to Table of Contents](#table-of-contents). @@ -226,7 +227,7 @@ The setup.sh script will create the following files: ## 4.10 Update Variables 4.10.1. Update Other Default Variables -* Navigate to the _defaults.tfvars_ file `cd terraform/implementation/ecs/default.tfvars`. +* Navigate to the _defaults.tfvars_ file ` cd terraform/implementation/ecs/` or `cd terraform/implementation/{insertEnvironmentName}`. * In this _defaults.tfvars_ file, you can update and override any other default values. 4.10.2. Test and Validate Your Changes