atmos icon indicating copy to clipboard operation
atmos copied to clipboard

Stale providers in a `.terraform.lock.hcl` file can cause issues

Open nitrocode opened this issue 3 years ago • 1 comments

Found a bug? Maybe our Slack Community can help.

Slack Community

Describe the Bug

Sometimes old providers are cached in a .terraform.lock.hcl file and need to be manually removed to allow upgrading modules.

It would be nice to have an atmos.yaml setting to remove a component's .terraform.lock.hcl (without running a full clean) prior to running a terraform init. So if this setting was enabled, and a plan/deploy/apply was run, it would first remove the lock file, then run the init, and then the desired command.

or just always run terraform init -upgrade

nitrocode avatar Jan 18 '22 16:01 nitrocode

We will solve this with atmos clean all see #272. I don't think this should happen automatically, or if it does, it would need to be a stack-level setting. It's not a "best practice" to remove the file (or the file wouldn't exist).

Upgrading every time automatically will lead to unpredictable behavior. That too should be a stack level setting, if anything.

osterman avatar Apr 19 '23 15:04 osterman