Is there a way to skip the InitAndApply
and Destroy
phases of the test?
I want to just terraform output
and build out my test assertions with testify/assert
Is there a way to skip the InitAndApply
and Destroy
phases of the test?
I want to just terraform output
and build out my test assertions with testify/assert
It does not fit very well for
Terratest
to skip theinit
andapply
phases. Just becauseTerratest
is an end-to-end test tool. According to the Terraform blog post Testing HashiCorp Terraform,Terratest
as and end-to-end tool aims to answer the question:For the type of test that you are looking for you might use a simple unit test like
terraform validate
that do not require active infrastructure resources or authentication to an infrastructure provider. Other tools for Terraform unit test can be found at the Some examples of Test-Driven Development for Infrastructure git repo.