dflook/terraform-refresh

Refresh Terraform state

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Maintainedlast commit Jan 13, 2026
License
None

Pinned Snippet

workflow.ymlSHA-pinned
uses: dflook/terraform-refresh@598553d84f194f7c2d558bfea4313204235ab6a9 # v2.2.3

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
pathPath to the Terraform root module to refresh state forno.
workspaceTerraform workspace to run the refresh state innodefault
variablesVariables 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_fileList of tfvars files to use, one per line. Paths should be relative to the GitHub Actions workspace no
backend_configList of Terraform backend config values, one per line.no""
backend_config_fileList of Terraform backend config files to use, one per line. Paths should be relative to the GitHub Actions workspace no""
targetList of resources to target, one per line. The refresh will be limited to these resources and their dependencies. no""
parallelismLimit the number of concurrent operationsno0
namedescription
failure_reasonWhen 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-reasonWhen 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_infoWhen 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-infoWhen 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_idIf the root module uses the `remote` or `cloud` backend in remote execution mode, this output will be set to the remote run id.