Getting “Error: Error acquiring the state lock” when running terraform plan in GitHub Actions. We’re using S3 backend with DynamoDB for locking. The workflow triggers on PR but fails if another job is running. Here is the backend config:
backend "s3" {
bucket = "my-tf-state"
key = "prod/terraform.tfstate"
region = "us-west-2"
dynamodb_table = "terraform-locks"
}
How do we handle concurrent plans without blocking the pipeline?