This blog explains how to use new terraform test
framework to test infrastructure automation scripts.
Pre-requisites: Install Terraform v1.6.0 or
later version, Azure subscription, code editor (Visual studio code use as the code editor in this blog)
What is the use of terraform test?
Terraform has introduced new test framework which
helps to achieve followings.
- Validate terraform configuration updates and get
verified new changes does not introduce any breaking changes.
- Terraform test supports running test against test
environment which allows to create short lived resources without breaking
existing resources.