Is there a way to find the lock ID associated with a Terraform state configuration by using terraform command.
I can get lock ID when I call "terrafrom plan" for project with locked state but "terraform plan" takes bit time.
Command "terraform state list" does not show lock id next to locked resources, it only shows list of resources in state.
2
Answers
The lock ID is present in a file called
.terraform.tfstate.lock.info
:I’m pretty sure that the best way to achieve it is to look into your state table (in Dynamo DB / S3) and see the relevant Lock ID’s and filter them by your TF modules.