https://garden.io logo
#🌱|help-and-getting-started
change module type per env?
k

kind-france-89777

12/14/2022, 10:29 PM
Is there a way to change a particular module's type and all the corresponding config based on the env it's being deployed to? In the specific example I'm trying to figure out it's a module named db where we would want to use a helm chart in one env and just a simple container in a different one.
c

curved-intern-91221

12/16/2022, 8:15 AM
Hi @kind-france-89777 ! You can try to keep both modules and disable them conditionally, on the basis of env. Please, take a look at this guide: https://docs.garden.io/using-garden/modules#disabling-modules The module names and service/task/test names must be unique.
k

kind-france-89777

12/16/2022, 3:56 PM
the unique names thing makes that sort of challenging as a solution
how would I handle needing to have this varying module as a dependency, then?
hm. I guess it just ignores dependencies that are disabled, so I guess I just would have to have unique names and have them all as dependencies
c

curved-intern-91221

12/19/2022, 9:44 AM
Ah, yes, it can ignore the disabled modules. Please try it out. If it doesn't work, please let us know. I'll be on vacation starting tomorrow, and will come back on Jan 9th