dflook/terraform-refresh
Refresh Terraform state
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Maintainedlast commit Jan 13, 2026
- License
- None
Pinned Snippet
uses: dflook/terraform-refresh@598553d84f194f7c2d558bfea4313204235ab6a9 # v2.2.3tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| path | Path to the Terraform root module to refresh state for | no | . |
| workspace | Terraform workspace to run the refresh state in | no | default |
| variables | Variables to set for the terraform plan. This should be valid Terraform syntax - like a [variable definition file](https://developer.hashicorp.com/terraform/language/values/variables#variable-definitions-tfvars-files). Variables set here override any given in `var_file`s. | no | — |
| var_file | List of tfvars files to use, one per line. Paths should be relative to the GitHub Actions workspace | no | — |
| backend_config | List of Terraform backend config values, one per line. | no | "" |
| backend_config_file | List of Terraform backend config files to use, one per line. Paths should be relative to the GitHub Actions workspace | no | "" |
| target | List of resources to target, one per line. The refresh will be limited to these resources and their dependencies. | no | "" |
| parallelism | Limit the number of concurrent operations | no | 0 |
Outputs
| name | description |
|---|---|
| failure_reason | When the job outcome is `failure`, this output may be set. The value may be one of: - `refresh-failed` - The Terraform apply operation failed. - `state-locked` - The Terraform state lock could not be obtained because it was already locked. If the job fails for any other reason this will not be set. This can be used with the Actions expression syntax to conditionally run steps. |
| failure-reason | When the job outcome is `failure`, this output may be set. The value may be one of: - `refresh-failed` - The Terraform apply operation failed. - `state-locked` - The Terraform state lock could not be obtained because it was already locked. If the job fails for any other reason this will not be set. This can be used with the Actions expression syntax to conditionally run steps. |
| lock_info | When the job outcome is `failure` and the failure_reason is `state-locked`, this output will be set. It is a json object containing any available state lock information and typically has the form: ```json { "ID": "838fbfde-c5cd-297f-84a4-d7578b4a4880", "Path": "terraform-github-actions/test-unlock-state", "Operation": "OperationTypeApply", "Who": "root@e9d43b0c6478", "Version": "1.3.7", "Created": "2023-01-28 00:16:41.560904373 +0000 UTC", "Info": "" } ``` |
| lock-info | When the job outcome is `failure` and the failure_reason is `state-locked`, this output will be set. It is a json object containing any available state lock information and typically has the form: ```json { "ID": "838fbfde-c5cd-297f-84a4-d7578b4a4880", "Path": "terraform-github-actions/test-unlock-state", "Operation": "OperationTypeApply", "Who": "root@e9d43b0c6478", "Version": "1.3.7", "Created": "2023-01-28 00:16:41.560904373 +0000 UTC", "Info": "" } ``` |
| run_id | If the root module uses the `remote` or `cloud` backend in remote execution mode, this output will be set to the remote run id. |