Preparing for Terraform Certification

Finally, my first HashiCorp certification has come! After a long period without sitting for an exam, on the 17th of December 2023 I achieved the HashiCorp Terraform Associate certificate, and like I’ve done for the past exams, it’s time to share my study notes.

This series of posts is my personal study guide I used for Terraform Associate exam preparation. According to the NDA I signed before sitting for the exam, I’ll never share exam questions or everything regarding the evaluation.

An important step into Platform Engineer

I consider this certification as one step to demonstrate the ability of Platform Engineers to provide automation skills in multiple clouds and multiple platforms.

But who is the Platform Engineer and what study path should take to better certify his skillset?

Today, one of the “impacts” of the transition from the traditional to “cloud-native” model is the company organization. A lot of companies are facing a complete reorganization to better address their business needs especially in cloud and cloud-native application space. And in this transition companies and employees need to close an important cultural gap especially in public cloud design and administration and in cloud-native space.

So, at first look, the Public Cloud and Kubernetes certifications are the most wanted, and checking LinkedIn recruiters, the most researched profiles today should include Certified Kubernetes Administrator (CKA) and AWS Solution Architect Associate or (better) Professional. But a lot of companies, that are embracing the hybrid cloud designs, are still looking for infrastructure skillsets like VMware and RedHat. Finally, automation is the key to making new and old “IT objects” work together… Then, this “hybrid role” that we are now identifying as “Platform Engineer” should know everything at multiple levels: from infrastructure to platform integrating with security and automation.

So, Terraform Associate could be a great chance for a Platform Engineer to demonstrate the ability to work better with cloud resources, abstracting configuration, and deployment and establish new methodologies for automating infrastructure and application deployments.

Preparing for the Terraform Associate Exam

Like every certification exam, I highly suggest learning and putting Terraform’s concepts into practice in a lab. For this reason, I recently published a post on how to deploy a small lab using Vagrant and VMware workstations that in a couple of minutes and without manual interventions, it’s possible to set up a ready-to-use environment for Terraform exam preparation. Then all tutorials shown in the next posts are gathered in my GitHub repo:

The official documentation is a perfect mix of theory and practical tutorial based on AWS, Azure, Docker, GCP, Oracle, and Terraform Cloud. For sure you’ll never find examples of how to deliver your infrastructure based on your needs but every topic will give you the right skill set to well produce and apply your configuration without writing a configuration obtained by a wild getting of pieces of code everywhere on the Internet.

Other than my study notes and the official documentation, I want to mention also a course on Pluralsight (ACloudGuru):

Then, if you want to “practice” with some exam questions I recommend a Practice Exam by Bryan Krausen available on Udemy:

I got ready for the exam by taking these quizzes after a deep study of all the documentation and tutorials. Questions are not the same, but you can use this resource to get an idea of the difficulty and the topics that the exam will cover.

The Blueprint

Terraform certification has basically two prerequisites:

  1. The ability to operate as a System Administrator in the environment where Terraform is “running”
  2. The knowledge of the target Platform where you’re deploying the infrastructure elements. If you’re learning on AWS you should be able to understand how it works and what infrastructure elements you’re delivering with a particular configuration.

It’s time to dive into certification topics, but, differently from what is reported on the official page, I rearranged the list (in my opinion, could be more effective, especially for those who are approaching Terraform for the first time):

  1. Understand Infrastructure as code IaC concepts
  2. Understand the purpose of Terraform
  3. Understand Terraform basics
    1. Install and version Terraform providers
    2. Describe plugin-based architecture
    3. Write Terraform configuration using multiple providers and describe how Terraform finds and fetches providers
  4. Use the core Terraform workflow
    1. Describe the workflow: Write – Plan – Create
    2. Initialize Terraform directory: terraform init
    3. Validate configuration: terraform validate
    4. Generate and review and execution plan: terraform plan
    5. Execute changes: terraform apply
    6. Destroy Terraform managed infrastructure: terraform destroy
    7. Apply a style and adjustments to a configuration: terraform fmt
  5. Read, generate, and modify configuration
    1. Demonstrate the use of variables and outputs
    2. Describe secure secret injection best practice
    3. Understand the use of collection and structural types
    4. Create and differentiate resource and data configuration
    5. Use resource addressing and resource parameters to connect resources together
    6. Use HCL and Terraform functions to write configuration
    7. Describe build-in dependency management (order of execution)
  6. Interact with Terraform modules
    1. use module sources including Terraform Module Registry
    2. Module input/output interaction
    3. Describe variable scope within modules/child modules
    4. Set module version
  7. Use Terraform outside of the core workflow
    1. Terraform import
    2. Terraform state
    3. Logging
  8. Implementing and maintaining state
    1. Describe the default local backend
    2. Describe state locking
    3. Handle backend and cloud integration authentication methods
    4. Differentiate remote state backend options
    5. Manage resource drift and Terraform state
    6. Describe backend block and cloud integration in configuration
    7. Understand secret management in state files
  9. Understanding Terraform Cloud capabilities
    1. Explain how Terraform Cloud helps to manage infrastructure
    2. Describe how Terraform Cloud enables collaboration and governance

All the contents in this study note are taken from the official documentation with my personal experience… and I am open to your suggestions and improvements (just contact me via X @linotelera )

   Send article as PDF