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

[BUG] scanning terragrunt modules scanning hidden directory and not honoring .tmskip marker #1656

Open
doug-lethin-simplisafe opened this issue Apr 19, 2024 · 4 comments
Assignees
Labels
bug Something isn't working planned

Comments

@doug-lethin-simplisafe
Copy link

Describe the bug
Calling terramate list --changed navigates hidden directories while scanning for terragrunt modules fails if it encounters a problem with a file its found. Placing a .tmskip in that directory doesn't help.

For reasons I think are not relevant here, we currently have a submodule as part of our terragrunt repo which has some terragrunt infrastructure in it, but it's not referenced or used by our terramate infrastructure. However, its presence as a submodule is causing problems because terramate trys to scan it.

I thought placing a .tmskip empty marker file in the .submodules directory would get it to be ignored but that doesn't work.

See error below.

thanks.

Expected behavior
I would expect terramate to either ignore directories that are hidden or honor the .tmskip marker

Log Output
terramate list --changed
Error: listing changed stacks error: scanning terragrunt modules: parsing Terragrunt file: /[REDACTED]/.submodules/[REDACTED]/_directory_templates/TEAM_OU_NAME/[REDACTED]/terragrunt.hcl:3,15-38: Error in function call; Call to function "find_in_parent_folders" failed: ParentFileNotFoundError: Could not find a account_remote_state.hcl in any of the parent folders of /[REDACTED]/.submodules/[REDACTED]/_directory_templates/TEAM_OU_NAME/[REDACTED]/terragrunt.hcl. Cause: Traversed all the way to the root.., and 1 other diagnostic(s) (and 21 elided errors)
Environment (please complete the following information):

  • OS: Mac
  • OS Version 14.4.1
  • Git Version 2.44.0
  • Terramate Version 0.6.3
@doug-lethin-simplisafe doug-lethin-simplisafe added the bug Something isn't working label Apr 19, 2024
@i4ki i4ki self-assigned this Apr 21, 2024
@mariux
Copy link
Contributor

mariux commented Apr 22, 2024

Thanks for letting us know. we are working on a fix and will provide a solution asap.

@mariux mariux added the planned label Apr 22, 2024
i4ki added a commit that referenced this issue Apr 24, 2024
## What this PR does / why we need it:

Introduces the `terramate.config.change_detection.terragrunt.enabled`
attribute supporting the options below:
- `auto`: detects if Terragrunt modules are present and enables
automatically.
- `off`: turn off the integration.
- `force`: do Terragrunt change detection even if no Terragrunt module
is detected.

## Which issue(s) this PR fixes:
Relates to #1656 

## Special notes for your reviewer:

Additional changes were required because the `config.Root` was not a
singleton.

## Does this PR introduce a user-facing change?
```
yes, adds a new feature.
```
@i4ki
Copy link
Contributor

i4ki commented Apr 25, 2024

Hey @doug-lethin-simplisafe

We released v0.6.5 with support for disabling the Terragrunt change detection for now.

We are working in improvements in the Terragrunt change detection to support .tmskip and we will let you know here when released.

Thank you.

@doug-lethin-simplisafe
Copy link
Author

Thanks. tried this out and it works great. appreciate the quick turnaround.

@JesalHaria
Copy link

hi just wondering, is there a proper fix for this now? I'm exploring the viability of terramate's change detection in our terragrunt stack to speed up our plans/applies as they currently take a long time to execute. I'm currently having this issue as well, and It seems like if it's not fixed/fixable then terramate won't be a viable option for us. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working planned
Projects
None yet
Development

No branches or pull requests

4 participants