Anyone have any ideas for dealing with the current...
# atlantis-community
j
Anyone have any ideas for dealing with the current bug in Terraform, where it will randomly fail to push the state to s3? https://github.com/hashicorp/terraform/issues/34528 Terraform would create a
errored.tfstate
but obviously we cant access this from Atlantis.
p
can you revert?
j
you have to basically fix it all by hand
and get the state file normal
since you dont have that error state to just push
p
you do not do state versioning?
➕ 1
backups?
j
im not asking for help fixing it
im asking if anyone has anything in place, for atlantis + that error file
ive only hit it in dev environments, so its not an issue.
g
I never had this issue. But we’re on an older terraform version.
j
but even a versioned state
doesnt fix the problem
TF changes stuff.
the state then fails to get updated
so any state you have in s3 is not matching what actually exists
g
The error file should be on Atlantis no? On the folder the branch is checked out
j
the only documentation of what the state should be is in that error file
@Gabriel Martinez now thats something, i didnt think of the fact it would hang around. since im seeing this randomly in our legacy env which is using jenkins, Im just trying to make sure im prepared for when it happens in our newer atlantis environments
downside of this, is that our developers who deploy, wont actually have access to atlantis
but i can get to it
g
As a last resort I would say it would work.
You can also have a post task to grep the output and do something extra. Maybe searching if the file exists (it’s the same name every time I think) and push it to an s3 bucket where someone can pick it up to manually cleanup?
j
ya, thats what I was thinking. atlantis has the AWS access, would just need something to check for the existence of that file, and do something with it
g
As a very last last resort 😅
j
I didnt want to write something, if someone else has already ran into this
in the non atlantis legacy stuff, there are probably 20-30 deploys a day, and ive seen it twice in the last 2 months
so its not frequent, but in prod it would be a PITA
💥 1
g
From the thread, looks like it was created on tf 1.6.5+
Just remember that it is possibly a sensitive file.
j
ya, and we are 1.6.6 😄