runatlantis / atlantis

Terraform Pull Request Automation
https://www.runatlantis.io
Other
7.51k stars 1.02k forks source link

Error acquiring the state lock (gcs) #4677

Open geekette86 opened 2 weeks ago

geekette86 commented 2 weeks ago

I created VM where i installed atlantis docker version ghcr.io/runatlantis/atlantis:v0.28.1-alpine with terraform version ATLANTIS_DEFAULT_TF_VERSION=v1.1.5 everything is cool except when i do PR i have this message in plan

running "/home/atlantis/.atlantis/bin/terraform1.1.5 plan -input=false -refresh -out \"/home/atlantis/.atlantis/repos/Devops/drp-iac/8/default/dir/subdir/project_name/default.tfplan\"" in "/home/atlantis/.atlantis/repos/Devops/drp-iac/8/default/dir/subdir/project_name": exit status 1
╷
│ Error: Error acquiring the state lock
│ 
│ Error message: 2 errors occurred:
│   * writing "gs://bucket_name/default.tflock" failed:
│ googleapi: Error 403: Access denied., forbidden
│   * storage: object doesn't exist
│ 
│ 
│ 
│ Terraform acquires a state lock to protect the state from being written
│ by multiple users at the same time. Please resolve the issue above and try
│ again. For most commands, you can disable locking with the "-lock=false"
│ flag, but this is not recommended.
╵

the problem there is no lock no id nothing and nothing even atlantis unlock not doing anything the service account attached to the VM has all the necessary permission on the gcs bucket where the state any thing i missed

geekette86 commented 1 week ago

hello any information @lkysow thank you

geekette86 commented 1 week ago

Please check https://github.com/runatlantis/atlantis/pull/4691