Skip to content

Commit

Permalink
project dir
Browse files Browse the repository at this point in the history
  • Loading branch information
mostafa6765 committed Jul 1, 2024
1 parent 31fdc46 commit 163b814
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ terrafrom-terragrunt-aws-project
│ ├── main.tf
│ ├── output.tf
│ └── variables.tf
├── terraform
├── projects
│ ├── common
│ │ └── common-resources.tf
│ ├── stage
Expand Down
2 changes: 1 addition & 1 deletion environment/stage/terragrunt.hcl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
terraform {
source = "../../terraform//stage"
source = "../../projects//stage"
}

include {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 3 additions & 3 deletions symlink-modules.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 163b814

Please sign in to comment.