How I prepared for, and passed the Hashicorp Certified Terraform Associate certification


I recently passed the Hashicorp Terraform certified associate certification. I’ve been using Terraform in various capacities for several years, and was stoked when I found out Hashicorp opened this certification to the public. The best part of the certification, the test only costs $70! That is SUPER, SUPER reasonable for a certification exam! Most certification exams cost upwards of $200, so my hats off to Hashicorp for making this test super afordable.

To help folks prepare, I thought I would share what I did to get ready for it. While I can’t share the test questions, I can give you some things to think about prior to taking the certification. The first place to start is the review guide. I read through every link on this page, and wrote a ton of HCL to play with features I haven’t used before (things like expanding function arguments and strip markers). You will need to have a pretty thorough understanding of each topic listed there to pass the exam.

The prep guide also has a large section on modules, so I spent some time reviewing how modules work. Specifically, the parent-child relationship, and how inputs and outputs are defined. I also wrote a number of custom modules to ensure I knew this stuff backwards and forwards. This allowed me to commit everything module related to memory, something no actual Terraform user does. When I create new modules in practice, I typically copy something I already have in version control, and modify it to serve my needs. I also read through the entire Terraform AWS VPC module the night before the test. I didn’t learn a lot, but having the syntax fresh in my mind definitely helped during the test.

Taking a step back, it might be useful to describe the environment I used to prepare for the exam. During my preparation, I used three projects. I had one project that utilized a free account in Terraform cloud, one that used an S3-backend, and a third that used local state. This was the first time I had the opportunity to work with Terraform cloud, and I was super impressed. I love what Hashicorp has done with workspaces, Sentinel, policy as code, cost forecasting, and putting these together to make collaboration super easy. The official study guide has several bullet points on this, so I would definitely get familiar working with all three.

The study guide also covers reading and writing Hashicorp Configuration Language (HCL). This is the foundation of Terraform, and you will need to have a thorough understanding of all of the items listed there. For the past several years, I’ve made extensive use of the Hashicorp Terraform console. This is a GREAT place to test interpolation syntax, functions, and review data sources. If I need to write HCL on a given day, the first thing I do is split my screen with tmux so I can have the console available. This is an area I didn’t spend a ton of time on, since I’ve used Terraform for so long. If you are new to Terraform, I would highly suggest spending a good bit of time here. It will pay off during the test, and will make it easier to utilize Terraform in a work environment.

If you use Terraform frequently, you are probably familiar with the command line options. Using “init” to initialize a project, “fmt” to format code, “validate” to verify your HCL is structurally sound, “plan” to get an execution plan, “taint” and “untaint” to purge resources, “apply” to implement your changes, and “destroy” to remove everything in a workspace. To make sure I knew all of the options, I ran ‘terraform -h’ and read the documentation for each command. I also played around with “import”, which is something I’ve never used in practice. But the study guide listed it, so I reviewed it just to be safe.

I don’t recall how much time I was given to take the test, but I finished everything in less than 30-minutes. The test was totally approachable, and I actually thought it was one of the easier tests I’ve taken. I’m not sure if this is because I’ve been using Terraform for so long, or I’m comparing it to the Kubernetes Certified Associate exam which I also recently passed. That test was intense. Not because the material was hard, but because you are asked to do a TON of stuff in a short period of time. If you have any questions on the Terraform exam, feel free to hit me up a Twitter. I can’t give you the questions, but I can help you prepare. Also willing to offer up some sample projects if that would help! Hopefully folks find this useful.

This article was posted by on 2020-05-11 01:00:00 -0500 -0500