Quick question, has anyone seen this weird error? with my GitHub Actions workflow when attempting to run terraform plan on pull requests for Genesys Cloud resources.
The pipeline uses a remote backend with DynamoDB state locking. On the pull_request event, the job initializes the backend and runs the plan. However, it consistently fails with a state lock error, even though no other jobs are running.
Error acquiring the state lock
Lock Info:
ID: 12345
Path: gen/gc-config
Operation: OperationTypeApply
Who: ci-runner@github-host
Version: 1.6.0
Created: 2023-10-27 10:00:00 +0000 UTC
Info:
The workflow YAML is standard:
name: TF Plan
on:
pull_request:
jobs:
plan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: hashicorp/setup-terraform@v2
- run: terraform init
- run: terraform plan
Is there a specific configuration required for the Terraform CLI to acquire a read-only lock or bypass the lock for plan operations in a CI environment? The apply step on merge works fine, suggesting the lock is released correctly there.