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-exclude-dir change in behavior #3622

Open
jasonwbarnett opened this issue Dec 4, 2024 · 1 comment
Open

--terragrunt-exclude-dir change in behavior #3622

jasonwbarnett opened this issue Dec 4, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@jasonwbarnett
Copy link

jasonwbarnett commented Dec 4, 2024

Describe the bug

After upgrading from v0.66.9 to v0.69.3 the --terragrunt-exclude-dir behavior seems to have broken. I looked at the diff which shows that the logic for excluding directories has been modified.

git diff v0.66.9...v0.69.3 configstack/module.go configstack/stack.go

The issue I am seeing is that excluded directories are still being executed.

I am setting TERRAGRUNT_WORKING_DIR and then passing relative paths to --terragrunt-exclude-dir

I've validated that rolling back to v0.66.9 restores the correct/expected behavior.

Steps To Reproduce

  1. Set TERRAGRUNT_WORKING_DIR to the root path.

  2. Run terragrunt with at least one module directory excluded via --terragrunt-exclude-dir

    terragrunt run-all apply --terragrunt-non-interactive --terragrunt-exclude-dir module_dir_name
    

Expected behavior

I would expect the excluded directories not to be executed.

Versions

  • Terragrunt version: v0.69.3
  • OpenTofu/Terraform version: v1.9.8
  • Environment details (Ubuntu 20.04, Windows 10, etc.): Linux, Ubuntu 22.04

Additional context

One thing to call out is I am using symlinks, so I have TERRAGRUNT_WORKING_DIR set to /data/path/to/source but the real path is something like /__w/5/s/path/to/source (mounted source in Azure DevOps container). This never caused issues before, but calling it out in case the newer implementation didn't account for that.

@jasonwbarnett jasonwbarnett added the bug Something isn't working label Dec 4, 2024
@yhakbar
Copy link
Collaborator

yhakbar commented Dec 11, 2024

Hey @jasonwbarnett ,

I think there's a good chance that the recent symlink work did impact this.

I've been noticing similar issues:
#3616

We'll look to evaluate this, and figure out the best path forward. You might be able to workaround this issue by using an absolute path instead of the symlinked path to the directory you're excluding.

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
Development

No branches or pull requests

2 participants