As you know, we are big fans of all things automation here, so this major update for Terraform has been long awaited.
The blog announcement has some really good detail on the new improvements that have come with 0.12, including the following:
- First-class expression syntax: express references and expressions directly rather than using string interpolation syntax
- Generalised type system: use lists and maps more freely, and use resources as object values
- Iteration constructs: transform and filter one collection into another collection, and generate nested configuration blocks from collections
- Structural rendering of plans: plan output now looks more like configuration making it easier to understand
- Context-rich error messages: error messages now include a highlighted snippet of configuration and often suggest exactly what needs to be changed to resolve them
The rather dull sounding generalised type system is one that we’ve been waiting for as it unlocks the ability to use complex lists and maps as argument values in Terraform modules. And this will combine nicely with the iteration constructs to unleash some more complex modules to accelerate your work with customers.
We will be putting together some examples of how those look to help promote good standards around governance, implement architectural patterns such as hub and spoke topology, and the deployment of standard shared services in line with some of the good work we’re seeing coming out of Redmond such as the ISO27001 Azure Blueprint.
This will be an ongoing effort in a dedicated GitHub organisation, which is currently a little empty, but we’ll post news updates here as the planned work progresses.
As part of that work we will have to update the existing Terraform labs, splitting them up into several smaller groups, revisiting some of the examples to make them 0.12 compliant and generating new content leveraging those module repos we need to create.
So, consider this a heads up for those of you slowly working through the current Terraform labs - you may want to shift up a gear before they all change!