{"id":21261393,"url":"https://github.com/dflook/terraform-unlock-state","last_synced_at":"2025-08-13T06:13:54.513Z","repository":{"id":95916344,"uuid":"594386088","full_name":"dflook/terraform-unlock-state","owner":"dflook","description":"GitHub action to unlock previously locked Terraform state","archived":false,"fork":false,"pushed_at":"2025-08-02T16:54:59.000Z","size":36,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-02T18:43:23.991Z","etag":null,"topics":["actions","devops","github-action","github-actions","terraform"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dflook.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":["dflook"]}},"created_at":"2023-01-28T11:46:05.000Z","updated_at":"2025-08-02T16:55:00.000Z","dependencies_parsed_at":"2023-04-19T17:00:45.307Z","dependency_job_id":"daed3c64-cfd2-4069-80af-079293bc1493","html_url":"https://github.com/dflook/terraform-unlock-state","commit_stats":null,"previous_names":[],"tags_count":157,"template":false,"template_full_name":null,"purl":"pkg:github/dflook/terraform-unlock-state","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dflook%2Fterraform-unlock-state","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dflook%2Fterraform-unlock-state/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dflook%2Fterraform-unlock-state/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dflook%2Fterraform-unlock-state/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dflook","download_url":"https://codeload.github.com/dflook/terraform-unlock-state/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dflook%2Fterraform-unlock-state/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270191647,"owners_count":24542279,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-13T02:00:09.904Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actions","devops","github-action","github-actions","terraform"],"created_at":"2024-11-21T04:29:22.983Z","updated_at":"2025-08-13T06:13:54.466Z","avatar_url":"https://github.com/dflook.png","language":null,"funding_links":["https://github.com/sponsors/dflook"],"categories":[],"sub_categories":[],"readme":"# terraform-unlock-state action\n\nThis is one of a suite of Terraform related actions - find them at [dflook/terraform-github-actions](https://github.com/dflook/terraform-github-actions).\n\nForce unlocks a Terraform remote state.\n\n## Inputs\n\n* `path`\n\n  Path to the Terraform root module that defines the remote state to unlock\n\n  - Type: string\n  - Optional\n  - Default: The action workspace\n\n* `workspace`\n\n  Terraform workspace to unlock the remote state for\n\n  - Type: string\n  - Optional\n  - Default: `default`\n\n* `backend_config`\n\n  List of Terraform backend config values, one per line.\n\n  ```yaml\n  with:\n    backend_config: token=${{ secrets.BACKEND_TOKEN }}\n  ```\n\n  - Type: string\n  - Optional\n\n* `backend_config_file`\n\n  List of Terraform backend config files to use, one per line.\n  Paths should be relative to the GitHub Actions workspace\n\n  ```yaml\n  with:\n    backend_config_file: prod.backend.tfvars\n  ```\n\n  - Type: string\n  - Optional\n\n* `lock_id`\n\n  The ID of the state lock to release.\n\n  - Type: string\n  - Required\n\n## Environment Variables\n\n* `GITHUB_DOT_COM_TOKEN`\n\n  This is used to specify a token for GitHub.com when the action is running on a GitHub Enterprise instance.\n  This is only used for downloading OpenTofu binaries from GitHub.com.\n  If this is not set, an unauthenticated request will be made to GitHub.com to download the binary, which may be rate limited.\n\n  - Type: string\n  - Optional\n\n* `TERRAFORM_CLOUD_TOKENS`\n\n  API tokens for cloud hosts, of the form `\u003chost\u003e=\u003ctoken\u003e`. Multiple tokens may be specified, one per line.\n  These tokens may be used with the `remote` backend and for fetching required modules from the registry.\n\n  e.g:\n\n  ```yaml\n  env:\n    TERRAFORM_CLOUD_TOKENS: app.terraform.io=${{ secrets.TF_CLOUD_TOKEN }}\n  ```\n\n  With other registries:\n\n  ```yaml\n  env:\n    TERRAFORM_CLOUD_TOKENS: |\n      app.terraform.io=${{ secrets.TF_CLOUD_TOKEN }}\n      terraform.example.com=${{ secrets.TF_REGISTRY_TOKEN }}\n  ```\n\n  - Type: string\n  - Optional\n\n* `TERRAFORM_SSH_KEY`\n\n  A SSH private key that Terraform will use to fetch git/mercurial module sources.\n\n  This should be in PEM format.\n\n  For example:\n\n  ```yaml\n  env:\n    TERRAFORM_SSH_KEY: ${{ secrets.TERRAFORM_SSH_KEY }}\n  ```\n\n  - Type: string\n  - Optional\n\n* `TERRAFORM_HTTP_CREDENTIALS`\n\n  Credentials that will be used for fetching modules sources with `git::http://`, `git::https://`, `http://` \u0026 `https://` schemes.\n\n  Credentials have the format `\u003chost\u003e=\u003cusername\u003e:\u003cpassword\u003e`. Multiple credentials may be specified, one per line.\n\n  Each credential is evaluated in order, and the first matching credentials are used.\n\n  Credentials that are used by git (`git::http://`, `git::https://`) allow a path after the hostname.\n  Paths are ignored by `http://` \u0026 `https://` schemes.\n  For git module sources, a credential matches if each mentioned path segment is an exact match.\n\n  For example:\n\n  ```yaml\n  env:\n    TERRAFORM_HTTP_CREDENTIALS: |\n      example.com=dflook:${{ secrets.HTTPS_PASSWORD }}\n      github.com/dflook/terraform-github-actions.git=dflook-actions:${{ secrets.ACTIONS_PAT }}\n      github.com/dflook=dflook:${{ secrets.DFLOOK_PAT }}\n      github.com=graham:${{ secrets.GITHUB_PAT }}  \n  ```\n\n  - Type: string\n  - Optional\n\n* `TERRAFORM_PRE_RUN`\n\n  A set of commands that will be ran prior to `terraform init`. This can be used to customise the environment before running Terraform.\n\n  The runtime environment for these actions is subject to change in minor version releases. If using this environment variable, specify the minor version of the action to use.\n\n  The runtime image is currently based on `debian:bookworm`, with the command run using `bash -xeo pipefail`.\n\n  For example:\n\n  ```yaml\n  env:\n    TERRAFORM_PRE_RUN: |\n      # Install latest Azure CLI\n      curl -skL https://aka.ms/InstallAzureCLIDeb | bash\n\n      # Install postgres client\n      apt-get install -y --no-install-recommends postgresql-client\n  ```\n\n  - Type: string\n  - Optional\n\n## Example usage\n\n```yaml\nname: \"Unlock state\"\non:\n  workflow_dispatch:\n    inputs:\n      path:\n        description: \"Path to the Terraform root module\"\n        required: true\n      lock_id:\n        description: \"Lock ID to be unlocked\"\n        required: true\n\nenv:\n  AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}\n  AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}\n\njobs:\n  unlock:\n    name: Unlock\n    runs-on: ubuntu-latest\n    steps:\n      - name: Checkout current branch\n        uses: actions/checkout@v4\n\n      - name: Terraform Unlock\n        uses: dflook/terraform-unlock-state@v2\n        with:\n          path: ${{ github.event.inputs.path }}\n          lock_id: ${{ github.event.inputs.lock_id }}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdflook%2Fterraform-unlock-state","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdflook%2Fterraform-unlock-state","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdflook%2Fterraform-unlock-state/lists"}