Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intelligently don't init on every apply/shell #620

Open
kevcube opened this issue Jun 7, 2024 · 2 comments
Open

Intelligently don't init on every apply/shell #620

kevcube opened this issue Jun 7, 2024 · 2 comments

Comments

@kevcube
Copy link
Contributor

kevcube commented Jun 7, 2024

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

@aknysh
Copy link
Member

aknysh commented Jun 7, 2024

@kevcube thank you.
We'll review this and improve.

@osterman
Copy link
Member

@kevcube have you seen the --skip-init flag? You can add that and then it won't do it automatically.

@osterman osterman added the Short List label Oct 11, 2024 — with Linear
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants