We are looking for a better way to swap out local modules via Terragrunt CLI. Currently engineers must comment out the module source (private git repo) and add a local path reference to their module. This is intrusive for many reasons, and has led to accidentally checking in the temporary pathing changes many times. Also, our TG project leverages module composition in both Root and Component modules. When working with a component module, this means we have 2 source references that need to be changed to test local module changes.
We've attempted to use --terragrunt-source
and supplying the absolute path to the local module we would like to use, however, that does not work. When providing a path to local module for a component module, it results in variables being dropped and not getting passed from the root module (where we instantiate component module) to the component module.
This screenshot shows us trying to run live/dev/backends/app
which instantiates the root module, tfm_10k_app
module. The tfm_10k_app
module instantiates the component module, tfm_10k_ecs_fargate
. The tags are loaded from an external module git repo in the Root module, and passed as a variable to the Component module. However, the tags are not lost. It's not clear why when supplying the --terragrunt-source
the tags are lost.
Would love some guidance around how to best leverage local modules for iterative development when adopting module composition best practices.