2
Using HashiCorp Configuration Language
In the first chapter, we examined Terraform’s architecture. It is a simple command-line tool that takes in code and creates a plan that it can later execute at the user’s behest. In this chapter, we will examine how to leverage Terraform’s language—HashiCorp Configuration Language (HCL)—to define infrastructure as code so that we can build sophisticated cloud-based architectures using Terraform.
The chapter covers the following topics:
- Resources and data sources
- Locals and types
- Variables and outputs
- Meta arguments
- Loops and iterations
- Expressions
- Functions
Resources and data sources
Resources and data sources play a critical role in Terraform and are probably the most important language constructs ...
Get Mastering Terraform now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.