terraform-github-actions

terraform-unlock-state action

This is one of a suite of Terraform related actions - find them at dflook/terraform-github-actions.

Force unlocks a Terraform remote state.

Inputs

Environment Variables

Example usage

name: "Unlock state"
on:
  workflow_dispatch:
    inputs:
      path:
        description: "Path to the Terraform root module"
        required: true
      lock_id:
        description: "Lock ID to be unlocked"
        required: true

env:
  AWS_ACCESS_KEY_ID: $
  AWS_SECRET_ACCESS_KEY: $

jobs:
  unlock:
    name: Unlock
    runs-on: ubuntu-latest
    steps:
      - name: Checkout current branch
        uses: actions/checkout@v4

      - name: Terraform Unlock
        uses: dflook/terraform-unlock-state@v1
        with:
          path: $
          lock_id: $