atmos
atmos copied to clipboard
Intelligently don't init on every `apply`/`shell`
Describe the Feature
On a slow connection, even with cached providers, atmos's behavior of running terraform init every time atmos is called slows down the development loop considerably.
Terraform nor terragrunt have this behavior, the first just errors if you don't init, the latter uses a cache dir with hashes of module versions to predict when init is necessary or not.
After digging I see the setting ATMOS_COMPONENTS_TERRAFORM_INIT_RUN_RECONFIGURE but this only seems to control whether the -reconfigure flag is added to init.
Also a note, finding the explanation of settings in the docs is only possible in the table describing the env vars. It should be somewhere higher or on its own page.
Expected Behavior
I would like atmos terraform apply to run terraform apply rather than init && apply
Use Case
Developing faster
Describe Ideal Solution
Some intelligent way to only init when necessary would be ideal.
Alternatives Considered
I can use atmos terraform shell but then my changes to vars in my yaml files require me to either edit the generated json in tandem (error-prone) or to exit my subshell and run atmos shell again (slow)
Additional Context
No response
@kevcube thank you. We'll review this and improve.
@kevcube have you seen the --skip-init flag? You can add that and then it won't do it automatically.