Using Provisioners with Terraform

Lab Steps

lock
Create a Terraform Provisioner

The hands-on lab is part of these learning paths

Terraform Associate Certification Exam Preparation
course-steps
1
certification
1
lab-steps
15

Ready for the real environment experience?

DifficultyBeginner
Time Limit30m
Students272
Ratings
5/5
starstarstarstarstar

Description

Terraform uses HCL, a declarative language that is great for managing the abundance of cloud resources. However, it's declarative nature introduces pain points in automation tasks where procedural languages like PowerShell or Bash perform much better. Provisioners can help with this by automating additional steps when creating or destroying Terraform resources. They can be a powerful tool in the Terraform developer's toolbelt. However, it's important to know from the start that with provisioners comes a cost. Introducing provisioners into Terraform code can cause the code to become complex and introduce other pain points like network or software dependencies in the Terraform configuration. This is why it is important to be aware of how to use provisioners and understand that they should be used as a last resort when developing a solution.

In this lab, you will learn how to create a provisioner to automate additional tasks when creating and destroying an ECR resource.

Learning Objectives

Upon completion of this lab you will be able to:

  • Understand how to create Terraform provisioners
  • Know when to use provisioners

Intended Audience

This lab is intended for:

  • Individuals studying to take the HashiCorp Certified: Terraform Associate exam
  • Anyone interested in learning how to use Terraform to manage Cloud Service Providers

Lab Prerequisites

You should be familiar with:

Environment before
PREVIEW
arrow_forward
Environment after
PREVIEW
About the Author
Students4381
Labs42
Courses1
Learning paths3

Luke is a Site Reliability Engineer at Microsoft. His background is infrastructure development using Terraform and in 2021 he was awarded the HashiCorp Ambassador award. He is an Azure DevOps Engineer Expert, Azure Administrator Associate, and HashiCorp Certified - Terraform Associate.

Covered Topics