Skip to main content

Introduction

··944 words·5 mins
Terraform - This article is part of a series.
Part 1: This Article

Introduction and motivation
#

Welcome to my course on Hashicorp Terraform! My humble goal with this course is to prepare you for the Terraform Associate Certification. What can I bring to the table that none of the other thousands of courses available online can’t give you? I believe my unique1 teaching style might give you different perspectives on a few topics. Maybe you can learn something new even if you are a seasoned Terraform expert? I hope so.

The Terraform Associate Certification is soon2 available in a new version, numbered 0033. I have passed the current version, which I suppose must be numbered 002, but I am not sure. Anyway, I have been using Terraform to and from for a few years. If I do a project in Azure I would normally use Azure Bicep, and if I do a project in AWS I would normally use CloudFormation or AWS CDK. However, if I ever did a project in GCP I would use Terraform (because GCP Deployment Manager is not an alternative). I would also use Terraform whenever I need to interact with an API outside of the big cloud providers.

I think Terraform is a good infrastructure as code tool, but every now and then I find it a bit less than ideal to work with. However, this is true for any tool that you use, eventually you find yourself in a situation where it feels like you are using a saw when a hammer would be the right tool. We’ll see if I can provide some anecdotes along the way through this course where I think Terraform could have been improved in some way.

Course content
#

In this course I will go through the Exam review available at developer.hashicorp.com, and repeated in the table below. I will not necessarily follow the guide in the order that it is presented there, instead I will present the concepts in an order that makes sense to me. I will try to list each topic from this list that is covered in each lesson, so that it is clear how the content relates to the overall certification goal.

PartContent
1Understand Infrastructure as Code (IaC) concepts
(a)Explain what IaC is
(b)Describe advantages of IaC patterns
2Understand the purpose of Terraform (vs other IaC)
(a)Explain multi-cloud and provider-agnostic benefits
(b)Explain the benefits of state
3Understand Terraform basics
(a)Install and version Terraform providers
(b)Describe plugin-based architecture
(c)Write Terraform configuration using multiple providers
(d)Describe how Terraform finds and fetches providers
4Use Terraform outside the core workflow
(a)Describe when to use terraform import to import existing infrastructure into your Terraform state
(b)Use terraform state to view Terraform state
(c)Describe when to enable verbose logging and what the outcome/value is
5Interact with Terraform modules
(a)Contrast and use different module source options including the public Terraform Module Registry
(b)Interact with module inputs and outputs
(c)Describe variable scope within modules/child modules
(d)Set module version
6Use the core Terraform workflow
(a)Describe Terraform workflow ( Write -> Plan -> Create )
(b)Initialize a Terraform working directory (terraform init)
(c)Validate a Terraform configuration (terraform validate)
(d)Generate and review an execution plan for Terraform (terraform plan)
(e)Execute changes to infrastructure with Terraform (terraform apply)
(f)Destroy Terraform managed infrastructure (terraform destroy)
(g)Apply formatting and style adjustments to a configuration (terraform fmt)
7Implement and maintain state
(a)Describe default local backend
(b)Describe state locking
(c)Handle backend and cloud integration authentication methods
(d)Differentiate remote state back end options
(e)Manage resource drift and Terraform state
(f)Describe backend block and cloud integration in configuration
(g)Understand secret management in state files
8Read, generate, and modify configuration
(a)Demonstrate use of variables and outputs
(b)Describe secure secret injection best practice
(c)Understand the use of collection and structural types
(d)Create and differentiate resource and data configuration
(e)Use resource addressing and resource parameters to connect resources together
(f)Use HCL and Terraform functions to write configuration
(g)Describe built-in dependency management (order of execution based)
9Understand Terraform Cloud capabilities
(a)Explain how Terraform Cloud helps to manage infrastructure
(b)Describe how Terraform Cloud enables collaboration and governance

After a first look at this table you might feel that this task is a bit daunting, but fear not! I believe this is a relatively doable certification even if you do not have years of experience writing infrastructure with Terraform. If you have never seen Terraform before, then you will have a more difficult time going through the certification journey than if you have at least used Terraform a few times in a real project.

Teaching style
#

For this course I will try to keep the content very hands-on with much focus on writing Terraform code, and using the terraform command line tool. Where required I will fill in theoretical details. I will focus on the important things, and if I think the official documentation or any other source can provide deeper insights that could be useful, but not strictly necessary, then I will provide links to these sources. The focus is to stick to the essential parts!

Summary
#

Not much to summarize in this part. I believe it is time to get started! See you in the next part.


  1. Unique as in you will not find this much shenanigans somewhere else! Just kidding. Or am I? ↩︎

  2. I am not sure when, but soon? ↩︎

  3. Judging by the numbering (two leading zeros) it seems like Hashicorp expects there to be many updates in the future! ↩︎

Mattias Fjellström
Author
Mattias Fjellström
Cloud architect · Author · HashiCorp Ambassador
Terraform - This article is part of a series.
Part 1: This Article