Terraform Interview Questions Guide
Terraform Interview Questions Guide
2. Intermediate Level
3. Advanced Level
[EDITION 01]
WHAT IS TERRAFORM?
The Configuration file in Terraform describes the components needed to run a single
application or your entire datacenter. Terraform then generates an execution plan
describing what it will do to reach the desired state, and then executes it to build
the described infrastructure. It creates incremental execution plans which can be
applied according to the configuration change.
Below are some of the most asked Terraform interview questions for a Terraform
Associate role:
2. © Copyright 2021 | K21 Academy | All Rights Reserved FREE CLASS: https://k21academy.com/terraform02
Learn Cloud from Experts
1. BEGINNER LEVEL:
TERRAFORM INTERVIEW QUESTION
Question 2: What are the reasons for choosing Terraform for DevOps?
Answer: Below are the reasons for choosing Terraform for DevOps:
It can do complete orchestration and not just configuration management (like Ansible and Puppet).
Has amazing support of almost all the popular cloud providers like AWS, Azure, GCP, DigitalOcean etc.
Easily manages the configuration of an immutable (dynamic) infrastructure.
Provide immutable infrastructure where configuration changes smoothly.
Works on HCL (HashiCorp configuration language), which is very easy to learn and understand.
Easily portable from one provider to another.
Easy Installation.
Plugin Installation
Child Module Installation
Backend Initialization
Packer
Cloud Foundry
Ansible
Kubernetes
3. © Copyright 2021 | K21 Academy | All Rights Reserved FREE CLASS: https://k21academy.com/terraform02
Learn Cloud from Experts
Execution Plan
Change Automation
Resource Graph
Infrastructure as code
Execution Plan
Change Automation
Resource Graph
Infrastructure as code
4. © Copyright 2021 | K21 Academy | All Rights Reserved FREE CLASS: https://k21academy.com/terraform02
Learn Cloud from Experts
2. INTERMEDIATE LEVEL:
TERRAFORM INTERVIEW QUESTION
Question 1: Explain the uses of Terraform CLI and list some basic CLI commands?
Answer: The command-line interface to Terraform is via the terraform command, which accepts a variety
of subcommands such as terraform init or terraform plan.
Common commands:
5. © Copyright 2021 | K21 Academy | All Rights Reserved FREE CLASS: https://k21academy.com/terraform02
Learn Cloud from Experts
6. © Copyright 2021 | K21 Academy | All Rights Reserved FREE CLASS: https://k21academy.com/terraform02
Learn Cloud from Experts
3. ADVANCED LEVEL:
TERRAFORM INTERVIEW QUESTION
Question 2: What do you mean by Terragrunt, list some of its use cases?
Answer: Terragrunt is a thin wrapper that provides extra tools for keeping your configurations DRY, work-
ing with multiple Terraform modules, and managing remote state.
Use cases:
Question 3: What steps should be followed for making an object of one module to
be available for the other module at a high level?
Answer: Following are the steps that should be followed for making an object of one module to be avail-
able for the other module at a high level:
1. First, an output variable to be defined in a resource configuration. Till you do not declare resource config-
uration details, the scope of local and to a module.
2. Now, you have to declare the output variable of module_A to be used in other module’s configuration. A
brand new and latest key name should be created by you and the value should be kept equivalent to the
module_A’s output variable.
3. Now, for module_B you have to create a file variable.tf. Establish an input variable inside this file having
exactly the same name as was in the key defined by you in module_B. In a module, this particular variable
enables the resource’s dynamic configuration. For making this variable available to some other module also,
replicate the process. This is because the particular variable established here have its scope restricted to
module_B.
7. © Copyright 2021 | K21 Academy | All Rights Reserved FREE CLASS: https://k21academy.com/terraform02
Learn Cloud from Experts
CONCLUSION
Terraform questions can be a little tricky sometimes so having knowledge about terraform is very crucial
before going for an interview. To test your knowledge on terraform, the best way is to appear for the certifi-
cation which will prepare you with some good questions and you will also earn a certification. More impor-
tantly, it will add credibility to your resume as well as give your confidence a boost.
8. © Copyright 2021 | K21 Academy | All Rights Reserved FREE CLASS: https://k21academy.com/terraform02
Learn Cloud from Experts
FREE CLASS
Register for our FREE Class To know about Cloud and DevOps Overview
and Cloud Automation Tools: Terraform, Cloud Formation, Ansible, Chef,
Puppet, why you should learn Terraform, Job opportunities for Terraform
Associate in the market, and what to study Including Hands-On labs you
must perform to clear Terraform Certification: Hashicorp Associate
so that you can stay ahead in your career and earn a lot more a
https://k21academy.com/terraform02
9. © Copyright 2021 | K21 Academy | All Rights Reserved FREE CLASS: https://k21academy.com/terraform02
Learn Cloud from Experts
“With the current success of Terraform, the cloud market has a lot of
requirements for DevOps engineers with good terraform knowledge
as it makes the deployment easy and efficient. If you are interested in
securing a terraform job for yourself but are not certain what type of
questions are asked in the interview then you are at the correct
Place.
ABOUT AUTHOR
10. © Copyright 2021 | K21 Academy | All Rights Reserved FREE CLASS: https://k21academy.com/terraform02
Learn Cloud from Experts
11. © Copyright 2021 | K21 Academy | All Rights Reserved FREE CLASS: https://k21academy.com/terraform02