Hi, we have 68 stacks to run through in our dev en...
# atmos
t
Hi, we have 68 stacks to run through in our dev environment and most of them use the azurerm provider, for instance, so it would be great to not download the provider 68 times. If the first stack downloads the azurerm provider, is there a way to make the later stacks reuse that already downloaded provider?
Maybe with
--skip-init
on the
command: terraform deploy
line. Going to need to test it out.
It'd be great if there was a reuse-providers flag in any case, for intelligently handling init when a required provider is missing, and otherwise simply avoid running init.
Does
atmos terraform clean
knock out the providers too though? If it does, then the
--skip-init
flag won't work in our case.
a
atmos terraform clean
will delete the
.terraform
folder (including the providers)
but once downloaded,
terraform init
will detect it (for the same component) and will not download it again, no?
(it still takes time, but terraform should detect the downloaded providers and reuse them)
--skip-init
should work as well (if you know that the providers were already downloaded)
t
Ah, that explains why its re-downloading them on each stack. We run
atmos terraform clean
between each stack in the workflow. Thanks.
And our pipeline is containerized, so nothing persists between pipeline job runs.
Is it necessary to run
atmos terraform clean
between each stack? Seems like we shouldn't need to, but I'm not certain.
a
no need to run terraform clean
atmos generates varfiles and backend files per component, so there’s no collision
👍 1