Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

terragrunt blocks does not take into account external modules folder #1631

Open
motatoes opened this issue Jul 22, 2024 · 0 comments
Open

terragrunt blocks does not take into account external modules folder #1631

motatoes opened this issue Jul 22, 2024 · 0 comments

Comments

@motatoes
Copy link
Contributor

consider this folder structure:

├── digger.yml
└── tf
    ├── env
    │   ├── common_vars.hcl
    │   ├── sandbox1
    │   │   ├── account_vars.hcl
    │   │   ├── environment_vars.hcl
    │   │   └── paris
    │   │       ├── region_vars.hcl
    │   │       └── s3
    │   │           └── terragrunt.hcl
    └── modules
        ├── README.md
        └── s3
            ├── README.md
            └── main.tf

and a digger.yml as follows:

generate_projects:
  blocks:
    - block_name: sandbox1
      terragrunt: true
      root_dir: "./tf/env/sandbox1/"
      include_patterns: [ "./tf/modules/**"]
      workflow: default
      workflow_file: digger_workflow.yml
    - block_name: sandbox2
      terragrunt: true
      root_dir: "./tf/env/sandbox2/"
      include_patterns: [ "./tf/modules/**"]
      workflow: default
      workflow_file: digger_workflow.yml

In this case making a PR which chaneges tf/modules/s3/main.tf should trigger changes to impacted terragrunt projects in tf/env/** directories, however it does not cause them to trigger because block search are scoped to the directory itself. We need to start supporting include/exclude for blocks in order to make digger also search blocks based on changes outside of the block scope ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant