This message was deleted.
# atlantis-community
s
This message was deleted.
w
I haven’t heard of those. is that a tfenv thing?
It will follow version constraints if included
c
Yeah.
Yeah, I know that.
I just thought I remembered it sticking with .terraform-version files too in the past. I am probably remembering wrong though.
w
don’t see it in the codebase, fwiw
but maybe could be possible with some kind of hook that runs before everything else?
c
yeah, probably
I know in the past I used a customized Atlantis image too, so that wouldn't be surprising.
w
https://www.runatlantis.io/docs/terraform-versions.html#via-terraform-config doesn’t mention it There’s a discussion here https://github.com/runatlantis/atlantis/issues/629 but it’s pretty old (2020). one person said they were using a custom workflow to use tfenv, but also ran into race conditions
c
I got a surprise update to 1.4 so that's what I was a little worried about.
w
there are a few quirks to watch out for w/ 1.4
c
Yeah, that's why I was a little annoyed
😆 1
w
I knew one of them was coming, cause I’d somehow come across the issue and was following it. the change in plan output (and how it interacted with Atlantis) was a big surprise to me tho
a kind of nasty in-between hack (vs. adding the requirement in the tf code) would be to have a preflight workflow that inserts the terraform required version based on your
.terraform-version
file? if there’s already a
terraform {}
block, might have to insert into it vs. just generating the whole block tho.
c
That's a little messier than I'd like. 😕 I will have to see if I can find something though.
w
do you already have something that’s overriding
ATLANTIS_DEFAULT_TF_VERSION
?
c
No...I wasn't setting that. But that might just be the best plan anywya.
w
ah, yeah, if you’re not otherwise influencing the version, and want the default version to be the same everywhere, that should work and will for sure be the easiest fix! We have that set as kind of an extra backstop (though occasionally forget to update it)
c
Hrm. It doesn't look like that will let me pin to say 1.3 instead of 1.3.7 or whatever though?
w
that’s true, but seems unlikely that there would be any 1.3.x releases past 1.3.9?
and the fix for the weird 1 empty line plan thing should be solved by 1.4.1 hopefully 🤞
c
1.4.1 is out 🙂
w
woot!
I never learn the lesson of waiting a week or two for a new minor version to settle
(we pin everything and use renovate to update the versions, but then I’m always excited to get the new hotness and approve it right away)
c
Yeah, that's the wise move 🙂
w
the whole lockfile thing is another whole long running ball of wax. I love a lot of things about Hashicorp / Terraform, but there are times where their “Hashi-way or the highway” annoys the @#$@#$ out of me
c
Yup 😕
w
I’d grudgingly use it / check it in in the way that they want if it actually worked properly all the time, but it doesn’t.
I also had a 1 line PR to remove the extra
\n
after
terraform validate
output… took them a year to look at it, then say they were making bigger / broader changes, then do nothing, then come back to it and say they were rejecting it and also that it wasn’t clear that an extra space was a problem 🙄 Ok, end of totally unrelated rant… get off my lawn.
w
@RB thanks! I haven’t yet verified that 1.4.1 fixes the “no output” thing, but it should. Assuming it does, you may want to update the pinned issue to reflect that, or at least mention that it’s 1.4.0 specifically?
r
I'll definitely update it but first we need to verify that 1.4.1 works as expected to resolve the issue you're referring to
w
I hadn’t tested, but I will right now
yup, works. whether there should also be a workaround for the empty output thing is a separate question, I guess
👍 1
I commented in #3200, but seems to (as expected) behave the same as it did before
❤️ 1