Terraform 0.12 HCL and interpolation syntax

HCL2

HCL2 combines HCL (Hashicorp Language) and HIL (Hashicorp Interpolation Language). So we now have first-class expression syntax. i.e. the end to "${ ... }".

https://www.hashicorp.com/blog/announcing-terraform-0-12

i.e. v0.11

  ip_cidr_range = "${cidrsubnet(var.base_network_cidr, 4, count.index)}"

v0.12

  ip_cidr_range = cidrsubnet(var.base_network_cidr, 4, count.index)

 

Note: the wording used here by Hashicorp is confusing:

0.11 wrapped string interpolations in ${}. See https://www.terraform.io/docs/configuration-0-11/interpolation.html

However, 0.12 now extends this to loops and conditionals: https://www.hashicorp.com/blog/terraform-0-12-template-syntax

Improved Error messages

Error messages that actually mean something!

Remote Plan and Apply