-
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
fix: Prevent download terraform with version 1.8.2 or higher #4474
fix: Prevent download terraform with version 1.8.2 or higher #4474
Conversation
In my opinion this change is useless as client can set terraform required version upper-bound constrain to |
How many repositories you have in your org to fix? :) Also, this is counter-productive in general. People should be able to use any terraform version they want, by providing version(s) in custom image, this change just prevents auto-download function from failing. |
I tested the code manually and it worked as expected.
|
I agree with @stasostrovskyi. IMO this is an issue with atlantis so should be solved at the atlantis level. Having users put Longer term, we likely should figure out how to extract the binary from >=1.8.2 versions, then we won't need this constraint, but this is a reasonable workaround until then. |
There is a test failure. Please fix |
We're affected by this as well and troubleshooting led me here. I very much appreciate the effort shown here and I understand the desire for a quick fix. Would it not be better though to go ahead and implement the library described in this comment? That seems like a better plan than having a hack workaround in the Atlantis repository. For a quick workaround though, having this change available as an image (with no intent to merge) seems like a good temporary plan to me. |
It fails on every single PR, and fix for it is here - #4462 |
I agree this is the known issue, should not affect this PR. @nitrocode any concerns? |
I agree we should investigate alternatives as recommended by terraform, but that will be a larger change and might necessitate a minor release. As for not producing a release, I personally feel as I mention in my comment above #4474 (comment) that this is now a bug in atlantis and so warrants a release in atlantis. |
We will patch the 0.27.2 and later release the 0.28.0 |
/cherry-pick 0.27 |
/cherry-pick release-0.27 |
Co-authored-by: Stas Ostrovskyi <[email protected]>
// Atlantis fails to download version 1.8.2 and higher. So, as a short-term fix, | ||
// we need to block any version higher than 1.8.1 until proper solution is implemented. | ||
// More details on the issue here - https://github.com/runatlantis/atlantis/issues/4471 | ||
highestSupportedConstraint, _ := version.NewConstraint("<= 1.8.1") |
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 would be nice if this value was condigurable. I recall a ticket from a frustrated user that could not set the maximum version allowed across their terraform
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.
Thanks again for this fix! |
…ntis#4474) Signed-off-by: kvanzuijlen <[email protected]>
what
Short-term fix for #4471. With this change Atlantis will only download terraform version
1.8.1
or lower, still respecting constraints set inrequired_version
field. Ifrequired_version
is set to>=1.8.2
or higher Atlantis will fallback to default version.why
Terraform packaging was changed in release 1.8.2 (see https://github.com/hashicorp/terraform/releases/tag/v1.8.2) and Atlantis throws an error for every default and custom workflow when trying to download it. Proper, long-term fix is described here - #4472 (comment).
tests
I have added two test cases to an existing test, but haven't run full Atlantis with this change.
references