terraform lock해제

문학적인유사성·2023년 6월 19일
0

뎁옵깃옵쿠베

목록 보기
26/53
post-custom-banner

lock 관련해서 오류가 생길때 해결법

terraform force-unlock ${아이디값}

1.vpc % terraform apply
Acquiring state lock. This may take a few moments...
╷
│ Error: Error acquiring the state lock
│ 
│ Error message: ConditionalCheckFailedException: The conditional request failed
│ Lock Info:
│   ID:        여기 아이디값을 가져와서 강제로 풀어주면됨
│   Path:      s3에 있는 해당 tfstate
│   Operation: OperationTypeApply
│   Who:       유저@컴퓨터
│   Version:   1.4.6
│   Created:   2023-06-03 05:12:24.056146 +0000 UTC
│   Info:      
│ 
│ 
│ 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.
╵
1.vpc % terraform force-unlock ${아이디값 넣기}
Do you really want to force-unlock?
  Terraform will remove the lock on the remote state.
  This will allow local Terraform commands to modify this state, even though it
  may still be in use. Only 'yes' will be accepted to confirm.

  Enter a value: yes

Terraform state has been successfully unlocked!

The state has been unlocked, and Terraform commands should now be able to
obtain a new lock on the remote state.
profile
Are you nervous? Don't be
post-custom-banner

0개의 댓글