forceUnlockInstanceState
Remove the Terraform/OpenTofu state lock on one step of an instance, whatever run holds it.
Use this when a deployment ended without releasing its lock, so every later deployment
of that step fails with "state is already locked". This is the same as
tofu force-unlock. If a deployment is still running and holds the lock, removing it
lets a second run write the same state at the same time and can corrupt it. Check that
no deployment of the instance is running first.
Requires instance:deploy on the instance.
mutation {
forceUnlockInstanceState(organizationId: "my-org", id: "ecomm-prod-db", step: "src") {
successful
result { id }
}
}
forceUnlockInstanceState(
organizationId: ID!
id: ID!
step: String!
): InstancePayload
Arguments
forceUnlockInstanceState.organizationId ● ID! non-null scalar {#organization-id}
Your organization's unique identifier.
forceUnlockInstanceState.id ● ID! non-null scalar {#id}
The instance whose state to unlock.
forceUnlockInstanceState.step ● String! non-null scalar {#step}
The bundle step whose state is locked, for example src.