Exam Terraform Associate All QuestionsBrowse all questions from this exam
Question 26

When should you use the force-unlock command?

    Correct Answer: C

    The force-unlock command should be used when automatic unlocking of the state fails. This command is intended to manually release a lock that could not be released through regular automated processes, which can occur if a Terraform command was interrupted and the automatic unlocking did not happen. It should be used with caution as it may leave the Terraform state in an inconsistent state.

Discussion
Egger1992Option: C

Be very careful with this command. If you unlock the state when someone else is holding the lock it could cause multiple writers. Force unlock should only be used to unlock your own lock in the situation where automatic unlocking failed. Source: https://www.terraform.io/language/state/locking

SilentMilliOption: C

The force-unlock command should be used when you need to manually release a Terraform state lock that cannot be released by other means. This command is typically used in scenarios where a Terraform command was interrupted, and the lock was not released automatically. Using the force-unlock command will forcibly release the lock, but it may leave the Terraform state in an inconsistent state, so it should be used with caution. Therefore, the correct answer is: C. Automatic unlocking failed

EltoothOption: C

C is correct answer. https://www.terraform.io/language/state/locking https://www.terraform.io/cli/commands/force-unlock

enookOption: C

C for sure

karendavtyanOption: C

C. Automatic unlocking failed

Ni33Option: C

C is correct

chimonsOption: C

C. Force unlock should not be used under normal circumstances

ceros399Option: C

answer is c