-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Document terraform bin download location #1018
Conversation
When upgrading from an older version that stored it in `.atlantis` this confused us for a little while.
Codecov Report
@@ Coverage Diff @@
## master #1018 +/- ##
=======================================
Coverage 71.96% 71.96%
=======================================
Files 65 65
Lines 5429 5429
=======================================
Hits 3907 3907
Misses 1215 1215
Partials 307 307 Continue to review full report at Codecov.
|
@@ -24,6 +24,6 @@ terraform { | |||
See [Terraform `required_version`](https://www.terraform.io/docs/configuration/terraform.html#specifying-a-required-terraform-version) for reference. | |||
|
|||
::: tip NOTE | |||
Atlantis will automatically download the version specified. | |||
Atlantis will automatically download the version specified into `/usr/local/bin/terraform${ATLANTIS_TERRAFORM_VERSION}`. eg. `/usr/local/bin/terraform0.11.14` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It only downloads the --default-tf-version
binary there. The binaries set via terraform config or atlantis.yaml get downloaded to $HOME/.atlantis/bin/terraform${VERSION}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lkysow hm, we are running atlantis in fargate, so it makes it a bit tricky to get in and poke around, but after upgrading to atlantis 0.12, we had to make the following change to our custom workflows to make it work for both TF 0.11 and 0.12 binaries:
Do you have a pointer to where the code is for the binary downloads - just trying to square what you're saying with what we were seeing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lkysow I think it's because of this: https://github.com/runatlantis/atlantis/blob/master/Dockerfile#L9-L16
We're using 0.11.14 and 0.12.24 so both of those are picked up by default in /usr/local/bin
it looks like..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I just noticed this in the changelog for 0.9:
- The directory where Atlantis downloads Terraform binaries is now in the PATH of custom workflows (Append terraform binary dir to PATH when running custom commands #678)
So maybe our problem goes away if we just drop the absolute path from the workflow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So maybe our problem goes away if we just drop the absolute path from the workflow
yes that should work now since we made that change.
There's 3 sources for tf downloads:
- Docker image puts them in /usr/local/bin
- --default-tf-version puts it in ~/.atlantis/bin
- atlantis.yaml or terraform_version config on individual projects puts in in ~/.atlantis/bin
I'm going to close for now after the discussion. |
When upgrading from an older version that stored it in
.atlantis
this confused us for a little while.