We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
terraform test
Is your feature request related to a problem? Please describe. I have written unit tests for a Terraform module (see https://developer.hashicorp.com/terraform/language/tests) and want to run them in CircleCI.
Describe the solution you'd like A terraform/test command and terraform/test job.
terraform/test
Describe alternatives you've considered I am currently using my own job definition to achieve this.
job
jobs: terraform-test: description: 'Execute Terraform tests.' executor: name: 'terraform/default' resource_class: '<< parameters.resource_class >>' tag: '<< parameters.tag >>' parameters: checkout: description: 'Perform checkout as first step in job.' type: 'boolean' default: false path: description: 'Path to the Terraform module.' type: 'string' default: '.' resource_class: description: 'Specify the resource class for Docker executor.' type: 'string' default: 'medium' tag: description: 'Specify the Terraform Docker image tag for the executor.' type: 'string' default: '1.0.0' test_directory: description: 'Set the Terraform test directory.' type: 'string' default: 'tests' timeout: description: 'Configure a custom timeout limit' type: 'string' default: '10m' steps: - when: condition: '<< parameters.checkout >>' steps: - 'checkout' - run: command: 'terraform -chdir=<< parameters.path >> init -input=false -test-directory=<< parameters.test_directory >>' name: 'terraform init' - run: command: 'terraform -chdir=<< parameters.path >> test -test-directory=<< parameters.test_directory >>' name: 'terraform test' no_output_timeout: '<< parameters.timeout >>'
The text was updated successfully, but these errors were encountered:
I am happy to submit a PR if there is interest in this.
Sorry, something went wrong.
Hi @joshuaspence, any contribution is welcome. It looks like you already have part of the work done, feel free to submit a PR and we will review it.
No branches or pull requests
Is your feature request related to a problem? Please describe.
I have written unit tests for a Terraform module (see https://developer.hashicorp.com/terraform/language/tests) and want to run them in CircleCI.
Describe the solution you'd like
A
terraform/test
command andterraform/test
job.Describe alternatives you've considered
I am currently using my own
job
definition to achieve this.The text was updated successfully, but these errors were encountered: