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
Terratestto skip theinitandapplyphases. Just becauseTerratestis an end-to-end test tool. According to the Terraform blog post Testing HashiCorp Terraform,Terratestas 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 validatethat 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.