-
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
please grant me write access to this repo so that I can submit a pr to bump the tf version #665
Comments
@brandon-dacrib run Atlantis with the flag Also you don't need write access to this repo to make a change, fork it and create a pull request: https://help.github.com/en/articles/fork-a-repo |
thx |
Setting the ATLANTIS_DEFAULT_TF_VERSION=0.12.1 environment variable fails because it looks like the ATLANTIS_DEFAULT_TF_VERSION variable isn't used anywhere in the current docker image however DEFAULT_TERRAFORM_VERSION here. I will sort out how to fork and send a PR, these should match the current reality. |
confirmed that it is not downloading 0.12.1 and these are the only versions that exist; I will continue with the fork and pr path 0.10.8 |
After looking at this more I realized that this approach would never have worked because the different versions of terraform are installed at build time, not run time. We need to update the version installed then to be current, I have done so in this PR #667 |
@brandon-dacrib I can assure you that that environment variable is respected :D I wrote Atlantis so I would know!
As you can see, Atlantis downloads that version and uses it for subsequent requests. ☝️ |
Ahh the confusion here is that it downloads that version to /home/atlantis/.atlantis/bin/terraform0.12.1 where I was looking somewhere else in in the filesystem when I was running it. |
Interestingly this was actually not working for me. I can see in the logs
that the download of the right version is happening however it is not being
used as the default unless I specify the full path to the binary in the
atlantis.yaml run steps like so:
- run: /home/atlantis/.atlantis/bin/terraform0.12.2 init -input=false
-no-color
I have tried specifying the version in the dir definition like:
terraform_version: 0.12.2
to no avail, I am going to keep digging. Thx.
…On Fri, Jun 7, 2019 at 5:41 PM Luke Kysow ***@***.***> wrote:
@brandon-dacrib <https://github.com/brandon-dacrib> I can assure you that
that environment variable is respected :D I wrote Atlantis so I would know!
docker run -e ATLANTIS_DEFAULT_TF_VERSION=0.12.1 runatlantis/atlantis server --gh-user=foo --gh-token=bar --repo-whitelist='*'
2019/06/07 21:40:47+0000 [WARN] cmd: No GitHub webhook secret set. This could allow attackers to spoof requests from GitHub
2019/06/07 21:40:48+0000 [INFO] server: Could not find terraform version 0.12.1 in PATH or /home/atlantis/.atlantis/bin, downloading from https://releases.hashicorp.com
2019/06/07 21:40:48+0000 [INFO] server: Atlantis started - listening on port 4141
2019/06/07 21:40:49+0000 [INFO] server: Downloaded terraform 0.12.1 to /home/atlantis/.atlantis/bin/terraform0.12.1
As you can see, Atlantis downloads that version and uses it for subsequent
requests. ☝️
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#665?email_source=notifications&email_token=AACMUOJ3SD3IPAIMR3HRK7LPZLIY7A5CNFSM4HVZI37KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXHCDNQ#issuecomment-500048310>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AACMUOJR7UMMBW6JMBMB3OLPZLIY7ANCNFSM4HVZI37A>
.
|
If you're using custom run steps you need to specify the full path to the binary (until the latest version is released that has that dir in PATH so you can just do In your case, if you're just running
|
Understood. Thank you.
…On Tue, Jun 25, 2019 at 12:59 PM Luke Kysow ***@***.***> wrote:
If you're using custom run steps you need to specify the full path to the
binary (until the latest version is released that has that dir in PATH so
you can just do terraform0.12.2. Another gotcha is that if you're not
using any built-in steps and only using run steps, then Atlantis won't
download the right terraform_version (this is a bug).
In your case, if you're just running /home/atlantis/.atlantis/bin/terraform0.12.2
init -input=false -no-color then you should be able to use the default
init step:
steps:
- init
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#665?email_source=notifications&email_token=AACMUOP7XRVICNU7KQD4LITP4JFHNA5CNFSM4HVZI37KYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYQ5BUA#issuecomment-505532624>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AACMUON45MQIN3GQZ3MUWMLP4JFHNANCNFSM4HVZI37A>
.
|
I'm affected by this bug - Is it being tracked anywhere? |
|
Since the version in the image is 0.12 and the current downloadable version is 0.12.1 new users will get the following error:
exit status 1: running "terraform init -input=false -no-color" in "/home/atlantis/.atlantis/repos/meetup/variant/618/default/tf/monitoring":
Initializing the backend...
Error refreshing state: state snapshot was created by Terraform v0.12.1, which is newer than current v0.12.0; upgrade to Terraform v0.12.1 or greater to work with this state
We need to keep these in sync.
The text was updated successfully, but these errors were encountered: