0.9.2
Consul Backend
{
"terraform": {
"backend": {
"consul": {}
}
}
}
I was expecting the .lock file in consul to be cleared after a successful terraform plan or terraform apply.
the lock for that specific path in consul, and thus the .lock file sticks around even after a successful terraform plan or terraform apply.
Please list the steps required to reproduce the issue, for example:
terraform init -backend-config=path=<path to key> -backend-config=address=<my-consul-cluster>terraform planterraform applyI think somebody also posted about this over in the Terraform Google group
Hi @domofactor! Sorry for the Consul detritus here, and thanks for reporting this.
I think this is the same issue that @jbardin was aiming to fix with #13430, and this fix should be included in the next release of Terraform that will be released soon.
thanks @apparentlymart, i'll wait for that release then. :)
Hello,
I think I have the same issue
0.9.3
terraform {
backend "consul" {
address = "consul.backend"
path = "tfstate/tfstate-test.tfstate"
lock = true
}
}
I was expecting the .lock file in consul to be cleared after a successful terraform apply.
There are 2 files on KV, .lock and .lockinfo
Apply complete! Resources: 42 added, 0 changed, 0 destroyed.
Error releasing the state lock!
Error message: consul lock was lost
terraform init Getting the values from environment variables.terraform apply Launching the apply creating tfstate-test.tfstate file and .lock and .lockinfo and finishing the apply successfully but with the releasing error.tfstate-test.tfstate, .lockand .lockinfo @curratore
I'm not sure what's going on, but your issue doesn't seem related.
The error message: Error message: consul lock was lost is of concern here, since that means the consul client no longer had a lock at the time it was released (which is why the cleanup wasn't done).
Can you open a new issue with any info you may have on how to reproduce this?
Thanks!
I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Most helpful comment
@curratore
I'm not sure what's going on, but your issue doesn't seem related.
The error message:
Error message: consul lock was lostis of concern here, since that means the consul client no longer had a lock at the time it was released (which is why the cleanup wasn't done).Can you open a new issue with any info you may have on how to reproduce this?
Thanks!