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

Missing files in when_modified when cascade-dependencies set to false #265

Open
stdmje opened this issue Dec 29, 2022 · 1 comment
Open

Comments

@stdmje
Copy link

stdmje commented Dec 29, 2022

Hi!
I just found something that IMHO is not working as expected.

When i set --cascade-dependencies=false there are missing files in the when_modified block.

Example:

I have the following:

resource_a.hcl

include "root" {
  path = find_in_parent_folders()
}

include "envcommon" {
  path   = "${dirname(find_in_parent_folders())}/_envcommon/resource_a/terragrunt.hcl"
  expose = true
}

resource_b.hcl

include "root" {
  path = find_in_parent_folders()
}

include "envcommon" {
  path   = "${dirname(find_in_parent_folders())}/_envcommon/resource_b/terragrunt.hcl"
  expose = true
}

In "${dirname(find_in_parent_folders())}/_envcommon/resource_b/terragrunt.hcl" i have the following dependency block.

dependency "resource_a" {
  config_path = "${dirname(find_in_parent_folders("env.yaml"))}/resource_a"
}

resource_c.hcl

include "root" {
  path = find_in_parent_folders()
}

include "envcommon" {
  path   = "${dirname(find_in_parent_folders())}/_envcommon/resource_c/terragrunt.hcl"
  expose = true
}

In "${dirname(find_in_parent_folders())}/_envcommon/resource_c/terragrunt.hcl" i have the following dependency block.

dependency "resource_b" {
  config_path = "${dirname(find_in_parent_folders("env.yaml"))}/resource_b"
}

If i set --cascade-dependencies=true all the dependencies including the files referenced in the include blocks are added to the when_modified block.

Then if i set --cascade-dependencies=false the atlantis.yaml file generated for resource_c is not including the file referenced in the include block from resource_b but i think it should since resource_b is a direct dependency of resource_c.

The idea of --cascade-dependencies=false is to not include dependencies of the dependencies, but all the include blocks for a direct dependency should be included.

Let me know what do you think.

Thanks for your support! All the best

@stdmje
Copy link
Author

stdmje commented Dec 29, 2022

I just found that the same behaviour happens if in a direct dependency i set the extra_atlantis_dependencies local. It just ignores it when using --cascade-dependencies=false

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