I know you can’t parameterize module source but I still need a solution to the following problem.
I’m having a git repo with several modules and examples. There are 2 main branches -
- main
- dev
The developers need the examples to use their local copy of the modules, while the main branch need to use the modules from terraform registry.
Here is what an example should look like for main branch:
module "asset" {
source = "company/module"
}
And this is how it should look like for developers:
module "asset" {
source = "../modules/module"
}
We regularly merge code from dev branch to main. Does anyone have a possible solution for this problem?
Thanks