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

CLI argument--terragrunt-include-dir includes all folders if the pattern does not match since version 0.50.1 #3274

Closed
Cakasim opened this issue Jul 18, 2024 · 2 comments · Fixed by #3286
Assignees
Labels
bug Something isn't working

Comments

@Cakasim
Copy link

Cakasim commented Jul 18, 2024

Describe the bug

A run of terragrunt run-all apply --terragrunt-include-dir "does-not-exist-*" leads to apply of all folders in the current directory. Especially dangerous when running in the CI and you upgraded from 0.50.0 to any later version!

The weird behaviour of this was introduced with this PR: #2664

IMO this is a breaking change but was added as a patch increment.

Steps To Reproduce

  • Create a folder with multiple subfolders that contain terragrunt.hcl files.
  • Head to the folder and execute the above mentioned command, make sure the include pattern you specify does not match.
  • You should see that it selects all folders for the execution plan.

I confirmed in my local tests that it is not related to glob matching, so any non existing folder in the include should work to reproduce the problem.

Expected behavior

  • After executing the above command and no folder is matching the specified include pattern, I expect an empty execution and nothing to happen.
  • The argument --terragrunt-include-dir should work like a whitelist (which it did before version 0.50.1)

Nice to haves

A screenshot of a CLI session to reproduce:
Screenshot 2024-07-18 at 13 00 21

Versions

  • Terragrunt version: 0.50.0
@Cakasim Cakasim added the bug Something isn't working label Jul 18, 2024
@yhakbar
Copy link
Collaborator

yhakbar commented Jul 23, 2024

That definitely is a bug! We'll look to get it fixed!

@yhakbar
Copy link
Collaborator

yhakbar commented Jul 23, 2024

Resolved in v0.63.4.

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