Using the Terraform CLI

Terraform is an Infrastructure as Code (IaC) tool that consists of two linked elements: the Terraform configuration, written in HashiCorp Configuration Language (HCL), which describes the infrastructure we want to provision, and the Terraform client tool, which will analyze and execute our Terraform configuration. In the previous two chapters, we have studied a variety of recipes on writing Terraform configuration using variables, functions, and expressions of HCL.

In this chapter, we will focus on the use of Terraform with its command lines and options. We will discuss how to have the code well presented, the destruction of resources, and the use of workspaces. Then we will learn how to import already existing resources, ...

Get Terraform Cookbook 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.