0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

GitHub ActionsでTerraformを実行中に「Failed to unlock state」となった場合

Posted at

はじめに

GitHub Actionsにて、Terraformを実行中に下記のエラーが出て、実行がロックされてしまったので、その解決法を記載します。

Failed to unlock state: lock id "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX" does not match existing lock
Lock Info:
  ID:        XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
  Path:      akane-dev-terraform-state/terraform.tfstate
  Operation: OperationTypePlan
  Who:       runner@akane
  Version:   1.1.6
  Created:   2022-09-09 07:52:09.98761957 +0000 UTC
  Info:

Terraformのバージョンは v1.1.6とする。

ローカルのブランチでの処理

  1. ローカルのブランチでterraform initを実行する。

  2. ローカルのブランチでterraform.lock.hclをコミットする。

  3. ローカルのブランチでリモートのブランチにプッシュする。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?