Terraform is a declarative orchestration tool for provisioning and versioning of infrastructure. It simplifies the management and orchestration of cloud workload, and it helps DevOps/SRE teams to build large-scale, multi-cloud (immutable) infrastructure safely and efficiently.
I have been working with Terraform at my workplace for a while, albeit from a Monitoring-as-Code perspective. Over the last few months, I delved deeper into other Terraform areas that I wasn’t very familiar with by creating numerous container orchestration lab exercises. These labs were mostly executed against the Raspberry Pi (but that’s another blog post). The next challenge was to assess my skill; and is there a better way to verify my skills and competencies in Infrastructure-as-Code using Terraform other than taking the Terraform certification exam? I think not. I had nothing to lose and it was an opportunity to add to my badge collection . I gave it a shot!
Terraform is gaining lots of popularity in the industry. These notes summarise what you should expect if you’re preparing for the exam. Whilst I cannot share the exam questions for obvious reasons, I can give you tips on how to add the shiny badge to your collection too.
Begin from the familiar
Given the inherent complexity of cloud (and hybrid) infrastructure, introducing new concepts like Terraform may add a steep learning curve, considering that Terraform uses a custom domain-specific-language (DSL). To stay focused and motivated, I’d recommend you start your learning path from a familiar tool, a tinker project, an abandoned project… find a reference point. Chances are you have some level of familiarity with one or more infrastructure automation, or an orchestration tools like Kubernetes, AWS CloudFormation, GCP Deployment Manager, Azure Resource Manager or even Ansible. My recommendation is to start from something you know, a side-hustle project, etc.
In my case, I have done a fair amount of work on infrastructure automation using Ansible and Kubernetes. I began by converting some of my existing Kubernetes manifests and Ansible tasks into the HashiCorp Configuration Language (HCL) , doing that gave me a lot of appreciation for Terraform. The code is a lot cleaner; Terraform modules allow users to write once and share independent reusable modules. Terraform abstracts idempotency for users, and it generates a full execution plan and dependency maps which you can export into graphviz in DOT format - to aid further analysis of the execution plan.
Moreso, most of the Terraform online courses are based on AWS, which may be misleading. Terraform is cloud-agnostic as well as the exam questions. You do not have to use AWS in your exercises. I chose to use Kubernetes and Ansible to learn Terraform because they were my reference points. Starting from the familiar will help you relate to past pain-points and appreciate Terraform’s workflow.
Now being a
kubectl fan, I have always wondered why some of my customers would prefer using Terraform to manage Kubernetes workload in their CI/CD pipeline. Surely
kubectl was made by Kubernetes for Kubernetes, I pondered. But I have seen the light. I now understand why organisations are adopting Terraform at a rapid rate to support their multi-cloud strategy. Big up to HashiCorp!
Starting from the familiar will help you relate to past pain points and appreciate Terraform’s workflow
In summary, get your hands really dirty with Terraform Configurations. You may start by creating monolith configurations, then convert them into modules. Try calling a child module with/out variables, and try accessing child module outputs from the calling module. Upload the module to GitHub or registry and modify your configuration to acquire the remote module. Next, practice implicit and explicit dependency definitions. Get stuck in!
The exam certainly challenges one’s understanding of basic concepts and operations, although it is not as tough as other exams in the same field in my personal opinion. Having said that, I am not surprised because it is an associate (practitioner) level exam. Also, my assessment of the difficulty level may be skewed because I cannot help but compare it to the Kubernetes Certified Developer exam, which I recently passed. The CKAD exam was intense and I wrote a prep guide here.
Furthermore, the exam questions are a combination of true/false, multiple choice, and multi-select questions. It is an online proctored exam, and you are expected to attempt 57 questions in 60 minutes. The overall result is presented to you as soon as you click on the “End Exam” button. Also, I received a confirmation email with details of my scores about 4 minutes after ending the exam, and another email with the acclaim badge 6 minutes after.
Please refer to the exam details page for further details on the objectives.
Study Guide : I followed the study guide religiously whilst taking notes and testing out most of the commands on the terminal.
Terraform: Up & Running : This book was of immense help when I started learning Terraform. It also provided further enlightenment on DevOps and Infra as code in general. You may not necessarily need to read the book if your sole purpose is to pass the exam rather than learning the crux of Terraform. Stick to the study guide.
HashiCorp Certified: Terraform Associate Prep Course 2020 This is an Udemy course by Warp 9 Training. The instructor is straight to-the-point, and it was a very good use of my 3 hours. There are some Terraform courses on udemy that is about 10 - 14 hours long, I honestly, don’t have that much time to commit. Warp 9’s course is concise and very informative.
Udemy Practice Exam by Bryan Krausen : These practice questions will help you get into the exam mode. The actual exam questions are more difficult though.
Terraform’s popularity and adoption is growing at an exponential rate. The exam objectives and study guide are accurate, they reflect the exam structure and questions. Start from a familiar point, or define a problem and get your hands dirty. You don’t have to use AWS, find a suitable provider from the registry , or build a simple (TODO list ?) provider and plug away.
Link to my certification badge - Youracclaim
Please leave a comment below if you have any questions.
Good luck and stay hungry!
Img source : beariscool