HashiTalks 2024: Mastering Terraform Testing, a layered approach to testing complex infrastructure

HashiTalks 2024: Mastering Terraform Testing, a layered approach to testing complex infrastructure
This blog post is the writeup of my talk at HashiTalks 2024 on the Terraform test framework. I discuss a layered approach to testing where we begin by using declarative validation in our Terraform modules and follow this up with successively more advanced tests. I will also discuss the need for policy-as-code because not everything makes sense as tests, some things should be policies.
Read more →

Take your testing to the cloud

Take your testing to the cloud
I have written a lot about the new Terraform testing framework, but there is one piece of the puzzle that I have written almost nothing about: Terraform Cloud. In this post I will go through how to publish a module to a private Terraform Cloud registry and enable testing for the module. I will also show you the new test generation using AI.
Read more →

Testing Framework in Terraform 1.6: A deep-dive

Testing Framework in Terraform 1.6: A deep-dive
This post follows up on my comprehensive guide to testing in Terraform. The testing framework is new and untested (pun not intended), but it already offers a lot of possibilities that will lead to better Terraform modules. In this post I will explore all the options that are available in the new run block and the new terraform test command.
Read more →

A Comprehensive Guide to Testing in Terraform: Keep your tests, validations, checks, and policies in order

A Comprehensive Guide to Testing in Terraform: Keep your tests, validations, checks, and policies in order
You have many options to use when it comes to testing and validating your Terraform configurations and modules. The newest addition to these options is the native Terraform testing framework. This in combination with custom conditions, check blocks, and policies allow for creating robust infrastructure-as-code. This post is a comprehensive guide to testing and validation in Terraform.
Read more →