Skip to content

Conversation

@alexandermarston
Copy link
Collaborator

Seeing as we know whether there is an active State Lock when we first initialise the Terraform, there isn't much point in trying to perform a force-unlock if there isn't an active lock in the first place.

This also helps scenarios where there is a stale lock ID associated with the Terraform resource, as we'll be unable to clear it. i.e:

Events:
  Type     Reason                Age                  From           Message
  ----     ------                ----                 ----           -------
  Warning  ReconciliationFailed  5m38s (x4 over 20h)  tf-controller  rpc error: code = Unknown desc = exit status 1
Failed to unlock state: failed to retrieve lock info for lock ID "ff2d104d-9560-56f7-e754-bd73005267a6": unexpected end of JSON input

@alexandermarston alexandermarston marked this pull request as draft November 27, 2025 12:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant