You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems there's an issue with how terragrunt-atlantis-config determines module paths when defined in child module .tf files.
The error:
$ terragrunt-atlantis-config_1.16.0_linux_amd64 generate --output atlantis.yaml --autoplan --parallel --create-workspace
INFO[0000] Could not find an old config file. Starting from scratch
Error: Failed to read module directory: Module directory /tmp/terragrunt-atlantis-config-debug/account/region/env/sub-mod does not exist or cannot be read.
The problem is with the account/region/env/example/example.tf file which relies on a module that is relative to the parent module in _modules/sub-mod.
Note that this exact configuration works just fine with terragrunt itself (plan/apply).
I'm happy to provide more details if needed.
The text was updated successfully, but these errors were encountered:
I don't get it, why is there a terraform file in account/region/env/example/? I've never seen intermixing of Terragrunt and terraform in the same folder before. Also the source in account/region/env/example/example.tf points to a module that doesn't exist, account/region/env/sub-mod
Because this is a feature of Terragrunt, it allows you to add or even override existing files from a base module and refer to resources from within the respective base module since it converges everything. Considering this, terragrunt will correctly evaluate the source relative path source = "../sub-mod" to the parent directory of the base module i.e. _modules/sub-mod and not account/region/env/sub-mod.
You can reproduce this using some null_resource definitions and use a similar file structure as given above, you will see Terragrunt will work correctly with these files while terragrunt-atlantis-config will fail.
It seems there's an issue with how
terragrunt-atlantis-config
determines module paths when defined in child module.tf
files.The error:
The configuration layout:
Describing below the file contents for an example you can use.
terragrunt.hcl
file is empty_modules/sub-mod/main.tf
file is emptyThe problem is with the
account/region/env/example/example.tf
file which relies on a module that is relative to the parent module in_modules/sub-mod
.Note that this exact configuration works just fine with terragrunt itself (plan/apply).
I'm happy to provide more details if needed.
The text was updated successfully, but these errors were encountered: