Hashicorp Terraform Associate Certification Tips

DevOps / Cloud Engineer ☁️ Terraform Evangelist 🚀 Docker & Kubernetes Enthusiast 🐳 Python Main 🐍
Search for a command to run...

DevOps / Cloud Engineer ☁️ Terraform Evangelist 🚀 Docker & Kubernetes Enthusiast 🐳 Python Main 🐍
No comments yet. Be the first to comment.
If you read my previous posts, you already know that I am big fan of using for_each and object variables when I'm building my modules. For quite some time, I've been waiting for a particular feature to exit beta and this is the optional object type a...

I’ve accidentally ran into Spacelift and I’m so happy I did. To be honest, I’ve never been a big fan of tools on top of IaC, but this is something else. As they state on their website, Spacelift is a sophisticated CI/CD platform for a variety of tool...

As I’ve stated in other posts I’ve done here, I am a big fan of Github Actions. I really like the simplicity of it and how easily you can build pipelines for your Terraform code. Here, I want to show you what pipelines I am building for my terraform ...
When Hashicorp introduced Terraform Cloud, I was already accustomed to Oracle’s Resource Manager offering and even though I was a not a big fan of this managed service approach, I still gave it a chance. There were some things that I really liked, th...

I won’t lie, I haven’t studied at all for this certification because I presumed my six years of experience with Terraform should be enough. One day, I just decided to take the certification and fortunately, my experience was enough to pass it.
My feeling was the certification didn’t have any absurd scenarios that you would never see in real life, like in other certifications that I’ve taken throughout my career, so that was satisfying.
You can see the result immediately after you end the exam, so that’s another big plus for me.
Logistics:
Enough with my exam experience and logistics, let’s jump in what you should learn.
In order to not have any issues with the certification, you should understand the basic components that are used when you are building your terraform automation:
You need to understand how to reference all the components from above and how you can link them. Make sure you have some experience with complex data types and you understand how they are used when you are building automations. Check out my other blog posts for getting a better hang of those.
Apart from that, look into all terraform commands that you can run:
terraform --help
Usage: terraform [global options] <subcommand> [args]
The available commands for execution are listed below.
The primary workflow commands are given first, followed by
less common or more advanced commands.
Main commands:
init Prepare your working directory for other commands
validate Check whether the configuration is valid
plan Show changes required by the current configuration
apply Create or update infrastructure
destroy Destroy previously-created infrastructure
All other commands:
console Try Terraform expressions at an interactive command prompt
fmt Reformat your configuration in the standard style
force-unlock Release a stuck lock on the current workspace
get Install or upgrade remote Terraform modules
graph Generate a Graphviz graph of the steps in an operation
import Associate existing infrastructure with a Terraform resource
login Obtain and save credentials for a remote host
logout Remove locally-stored credentials for a remote host
output Show output values from your root module
providers Show the providers required for this configuration
refresh Update the state to match remote systems
show Show the current state or a saved plan
state Advanced state management
taint Mark a resource instance as not fully functional
test Experimental support for module integration testing
untaint Remove the 'tainted' state from a resource instance
version Show the current Terraform version
workspace Workspace management
Global options (use these before the subcommand, if any):
-chdir=DIR Switch to a different working directory before executing the
given subcommand.
-help Show this help output, or the help for a specified subcommand.
-version An alias for the "version" subcommand.
Check subarguments of those commands, too, because you are most definitely going to see some questions for those.
You are going to get a couple of questions related to how modules work, how can you use outputs of those modules and of course how you can reference them using their remote sources.
I would totally recommend spending some time on Terraform’s built-in functions: merge, try, can, lookup, unsensitive, to name a few.
Play a little bit with for_each, count and ternary operators and also understand how to use splat (*).
Managing state is a crucial topic for this certification. You should be able to articulate why using a remote state is better than having a local one.
Also, it is really important to understand how resource import is working and how you can remove resources from the state.
Terraform Cloud is another topic that you are going to face during the certification, I believe it sums up to <10% of the questions from the exam, but the questions are fairly easy.
Take a glance of Terraform Cloud’s documentation and try to understand concepts like:
If you know how Terraform works and you have some hands-on experience with it, I believe this certification exam is fairly easy. Of course there will always be some things that you haven’t used, but you don’t need to get 100/100 in order to pass.