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

Document terraform bin download location #1018

Closed
wants to merge 1 commit into from

Conversation

mwarkentin
Copy link
Contributor

When upgrading from an older version that stored it in .atlantis this confused us for a little while.

When upgrading from an older version that stored it in `.atlantis` this confused us for a little while.
@codecov
Copy link

codecov bot commented Apr 30, 2020

Codecov Report

Merging #1018 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 8d318eb...83b3c22. Read the comment docs.

@@ -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`
Copy link
Member

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}

Copy link
Contributor Author

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.

Copy link
Contributor Author

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..

Copy link
Contributor Author

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:

So maybe our problem goes away if we just drop the absolute path from the workflow

Copy link
Member

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:

  1. Docker image puts them in /usr/local/bin
  2. --default-tf-version puts it in ~/.atlantis/bin
  3. atlantis.yaml or terraform_version config on individual projects puts in in ~/.atlantis/bin

@lkysow
Copy link
Member

lkysow commented May 25, 2020

I'm going to close for now after the discussion.

@lkysow lkysow closed this May 25, 2020
@mwarkentin mwarkentin deleted the patch-2 branch May 26, 2020 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants