dflook/terraform-test
Execute automated tests for a Terraform module
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Maintainedlast commit Jan 13, 2026
- License
- None
Pinned Snippet
uses: dflook/terraform-test@919e4d8e694dbea2a98f59453d8f4f10c57ea0d3 # v2.2.3tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| path | The path to the Terraform module under test | no | . |
| test_directory | The directory within the module path that contains the test files. | no | "" |
| test_filter | The 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 | "" |
| variables | Variables 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_file | List of tfvars files to use, one per line. Paths should be relative to the GitHub Actions workspace | no | — |
Outputs
| name | description |
|---|---|
| junit_xml_path | A 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-path | A 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_reason | When 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-reason | When 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. |