Member-only story

Terraweek Day 2Challenge

Always learning
5 min readJun 7, 2023

Introduction

The HashiCorp Configuration Language (HCL) is a configuration language authored by HashiCorp. HCL is used with HashiCorp’s cloud infrastructure automation tools, such as Terraform. The language was created to be both human and machine-friendly. It is JSON compatible, which means it is interoperable with other systems outside of the Terraform product line.

Terraform is an open-source tool written in the Go programming language.

Terraform Resources

Every provider comes with a set of resources. resource, as the name suggests, represents the actual cloud resource to be created in the configuration language.

HCL Syntax Overview

HCL’s configuration syntax is easy to read and write. It was created to have a more clearly visible and defined structure.

HCL Blocks

A block is a container for other content. Blocks have a type that can have zero or more required labels followed by { } brackets that contain the block's body. Blocks can be nested inside each other.

Terraform Block Types

  1. terraform block
  2. provider block
  3. resource block
  4. variable block
  5. locals block
  6. data block
  7. module block
  8. output block
  9. provisioner block

--

--

Always learning
Always learning

Written by Always learning

கற்றுக் கொள்ளும் மாணவன்...

Responses (1)