We use terraform with postgres backend and I would like to use a gitops approch in order to run
terraform apply when a pull request is merged to main branch.
I would like to avoid parallel executions (ex: 2 pr are merged). I know that the cli already handle this case by locking the state.
I would like to know if it’s possible to run a command like
terraform state status to know before
terraform apply if the state is locked or not ? FYI I can access the state as it’s a standalon pg database.