-
Context: gruntwork-io/terragrunt#2530 This is related to using mono-repo like environments where providers might not be the same for all your configurations, e.g
So let's say that terragrunt.hcl (root level) includes the following providers:
And let's say that the eks_addons needs
Because I have the overwrite in both places; Terragrunt actually is fighting over which overwrites at the end which sometimes results in errors like:
Or
Just because a single module requires more providers it shouldn't mean that I need to add the provider to the root terragrunt, then that means all my modules require now to use the same providers, even if they don't need it and the worst case is that we can't properly test provider upgrades if we can't successfully override versions on child modules. How do y'all handle this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hello Jhan! Terraform actually has something to handle this built in. You're looking for override files. In this case, your versions.tf for eks_addons just needs to be named "versions_override.tf". From there terraform/tofu will do a block level merge of all of that blocks parameters. The specifics for how the terraform block gets merged is at the bottom of the docs here. Does that solve your problem? |
Beta Was this translation helpful? Give feedback.
Hello Jhan! Terraform actually has something to handle this built in. You're looking for override files.
In this case, your versions.tf for eks_addons just needs to be named "versions_override.tf". From there terraform/tofu will do a block level merge of all of that blocks parameters. The specifics for how the terraform block gets merged is at the bottom of the docs here.
Does that solve your problem?