terragrunt
terragrunt copied to clipboard
Enhancement request: TERRAGRUNT_INCLUDE_MODULE_PREFIX strip pwd
It would be great if there were an option to strip the pwd from the output of TERRAGRUNT_INCLUDE_MODULE_PREFIX=1. It's great that now we can read the terraform output and easily figure out which module is running, but for systems that have a deep directory structure, it's easy for the output to get spammed across the terminal since it lists the whole pwd.
[/home/charles/working/customer/my-project-name/my-infrastructure-directory/some-subdirectory/this-environment/terraform-module-1]
[/home/charles/working/customer/my-project-name/my-infrastructure-directory/some-subdirectory/this-environment/terraform-module-1] Initializing the backend...
[/home/charles/working/customer/my-project-name/my-infrastructure-directory/some-subdirectory/this-environment/terraform-module-1]
[/home/charles/working/customer/my-project-name/my-infrastructure-directory/some-subdirectory/this-environment/terraform-module-2/submodule]
[/home/charles/working/customer/my-project-name/my-infrastructure-directory/some-subdirectory/this-environment/terraform-module-2/submodule] Initializing the backend...
[/home/charles/working/customer/my-project-name/my-infrastructure-directory/some-subdirectory/this-environment/terraform-module-2/submodule]
It would be great it the output were configurable to be just:
[./terraform-module-1]
[./terraform-module-1] Initializing the backend...
[./terraform-module-1]
[./terraform-module-2/submodule]
[./terraform-module-2/submodule] Initializing the backend...
[./terraform-module-2/submodule]
I came here to request the same!
Tested to find the answer myself, it is the absolute path...
Yeah, it's the absolute path:
[/home/sysop/code/github/dhirschfeld/azure-infra-test/terraform/dev/network]That takes up a lot of screen real-estate. It would be great if the path could be relative to the
cwd- i.e. running in thedevfolder that would be:[./network]
Originally posted by @dhirschfeld in https://github.com/gruntwork-io/terragrunt/issues/2493#issuecomment-1537609208
Bump!
This gist https://gist.github.com/antonbabenko/675049186e54b770b4789886d2056639#file-bash_profile attempts to do that, but doesn't completely work for me.
Also, it feels like this should be a native terragrunt cli implementation.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for raising this issue.
Ugh, a stale bot! 🤢
Possibly resolved by https://github.com/gruntwork-io/terragrunt/pull/3338?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for raising this issue.
This is the default now! Sorry this went stale.