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

atlantis plan does not do init -upgrade first #1698

Closed
dimisjim opened this issue Jul 12, 2021 · 4 comments
Closed

atlantis plan does not do init -upgrade first #1698

dimisjim opened this issue Jul 12, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@dimisjim
Copy link
Contributor

dimisjim commented Jul 12, 2021

I had the impression that after #443 the upgrade flag is the default setting.

But after replanning, atlantis does not pick up the newest version of the module which is referenced via git.

@gezb
Copy link
Contributor

gezb commented Jul 12, 2021

I submitted #1651 which I think has caused this.

The logic is if .terraform.lock.hcl exists Atlantis assumes you want to lock the providers to the versions specified in the lock file as that is what the Dependency lock file is there for and so does not add -upgrade to the terraform init argument list.

I now see the issue with this for anyone not using the dependency locking feature in that the first time terraform init is run it will generate the lock file and the then subsequent re-planning will use the same lock file

Not sure of a good way of addressing this? Maybe check if .terraform.lock.hcl exists prior to the init - and if not add a step to delete it after the terraform init has been run if it exists?

@dimisjim
Copy link
Contributor Author

dimisjim commented Jul 12, 2021

Yes to your last question.

Atlantis behavior shouldn't change based on what it does in its untracked and unmonitored internal state. We do not keep the tf lock file, thus we expect atlantis not too.

@gezb
Copy link
Contributor

gezb commented Jul 12, 2021

I'll prepare a PR to fix this in the next few days

@jamengual
Copy link
Contributor

closed by #1701

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants