dflook/terraform-test

Execute automated tests for a Terraform module

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-test@919e4d8e694dbea2a98f59453d8f4f10c57ea0d3 # v2.2.3

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

namedescriptionrequireddefault
pathThe path to the Terraform module under testno.
test_directoryThe directory within the module path that contains the test files.no""
test_filterThe test files to run, one per line. If not specified, all test files in the `test_directory` will be run. The are paths relative to the module path. no""
variablesVariables to set for the tests. 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
namedescription
junit_xml_pathA test report in JUnit XML format. The path is relative to the Actions workspace. This will only be available when using Terraform 1.11.0 or later.
junit-xml-pathA test report in JUnit XML format. The path is relative to the Actions workspace. This will only be available when using Terraform 1.11.0 or later.
failure_reasonWhen the job outcome is `failure`, this output may be set. The value may be one of: - `no-tests` - No tests were found to run. - `tests-failed` - One or more tests failed. 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: - `no-tests` - No tests were found to run. - `tests-failed` - One or more tests failed. 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.