diff --git a/README.md b/README.md index c6cd643..3f80759 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ terrafrom-terragrunt-aws-project │ ├── main.tf │ ├── output.tf │ └── variables.tf -├── terraform +├── projects │ ├── common │ │ └── common-resources.tf │ ├── stage diff --git a/environment/stage/terragrunt.hcl b/environment/stage/terragrunt.hcl index 8de8584..b6c5a5b 100644 --- a/environment/stage/terragrunt.hcl +++ b/environment/stage/terragrunt.hcl @@ -1,5 +1,5 @@ terraform { - source = "../../terraform//stage" + source = "../../projects//stage" } include { diff --git a/terraform/common/.gitkeep b/projects/common/.gitkeep similarity index 100% rename from terraform/common/.gitkeep rename to projects/common/.gitkeep diff --git a/terraform/common/common-resources.tf b/projects/common/common-resources.tf similarity index 100% rename from terraform/common/common-resources.tf rename to projects/common/common-resources.tf diff --git a/terraform/prod/main.tf b/projects/prod/main.tf similarity index 100% rename from terraform/prod/main.tf rename to projects/prod/main.tf diff --git a/terraform/prod/variables.tf b/projects/prod/variables.tf similarity index 100% rename from terraform/prod/variables.tf rename to projects/prod/variables.tf diff --git a/terraform/stage/main.tf b/projects/stage/main.tf similarity index 100% rename from terraform/stage/main.tf rename to projects/stage/main.tf diff --git a/terraform/stage/variables.tf b/projects/stage/variables.tf similarity index 100% rename from terraform/stage/variables.tf rename to projects/stage/variables.tf diff --git a/symlink-modules.sh b/symlink-modules.sh index 7ab54c9..2704061 100755 --- a/symlink-modules.sh +++ b/symlink-modules.sh @@ -4,12 +4,12 @@ SOURCE_DIR="modules" # Get the list of environments by reading the directory names inside the terraform folder -COMPONENT_DIR="terraform" -ENVIRONMENTS=($(ls -d $COMPONENT_DIR/*/ | xargs -n 1 basename | grep -v '^common$')) +PROJECT_DIR="project" +ENVIRONMENTS=($(ls -d $PROJECT_DIR/*/ | xargs -n 1 basename | grep -v '^common$')) # Loop through each environment and create symlinks for modules for ENV in "${ENVIRONMENTS[@]}"; do - TARGET_DIR="$COMPONENT_DIR/$ENV/modules" + TARGET_DIR="$PROJECT_DIR/$ENV/modules" # Ensure the target directory exists mkdir -p "$TARGET_DIR"