DEV Community

Cover image for Terraform Interview Questions @2020
Neha Bharti
Neha Bharti

Posted on

Terraform Interview Questions @2020

  1. What is Terraform?

Terraform is an open-source infrastructure as a code software tool created by HashiCorp It is a tool for building, changing, and versioning infrastructure safely and efficiently. Terraform can manage existing and popular service providers as well as custom in-house solutions.

2. How to Terraform work?

Terraform produce an execution plan delineate, what it will do to reach the desired state, and then executes it to build the described infrastructure. As the configuration changes, Terraform is able to determine what changed and create incremental execution plans which can be applied.

3. Explain the uses of Terraform CLI?

Terraform is controlled via a very easy to use the command-line interface (CLI) it is only a single command-line application: terraform. This application then takes a subcommand such as "apply" or "plan". The complete list of subcommands is in the navigation to the left.

4. what are the features of Terraform?
Some features of Terraform are:-

  1. Graphing - Its features of graphing that are built-in are helpful in visualizing the infrastructure.
  2. Custom Syntax - Its custom syntax is very friendly which aids in enhancing efficiency.
  3. Resource Relationships - A very beneficial feature of terraforming is that it is able to understand resource relationships.
  4. Updates - The updates and features are added by the Open Source Project. It does so with a group of lots of contributors.
  5. Improved Maintenance - It is capable of breaking down the configuration into small parts or chunks for improving the organization and the maintenance.

5. What are the components of Terraform?

Terraform is another notable point for the best Terraform interview questions. The logical division of Terraform into distinct structures refers to two distinct components.

The two components are the Terraform Core and Terraform Plugins.

  1. The Terraform Core utilizes remote procedure calls (RPCs) for communicating with Terraform Plugins. In addition, Terraform Core also offers diverse ways of discovering and loading plugins according to requirements.
  2. The Terraform Plugins represent an implementation for a specific service such as bash or AWS or provisioner.

6. What are the reasons to choose Terraform for DevOps?

To choose to Terraform for DevOps one important reason people consider Terraform is to manage their infrastructure as code. Infrastructure as code is also a key and foundation for DevOps practices such as version control, code review, continuous integration, and continuous deployment.

7. Define Modules in Terraform.

Modules in terraforming is a container for multiple resources that are used together. Every Terraform configuration has at least one module, known as its root module, which consists of the resources defined in the . tf files in the main working directory.

8. what is the Terraform cloud?

Terraform Cloud is a SaaS that we support—that instead when you run Terraform you still could run it on your local machine, but now it saves and retrieves the state file from Terraform Cloud—which is running over here. Terraform Cloud removes many of the complexities in trying to maintain your own Terraform state files in a multi-team.

9. How to check the installed version of Terraform?

To check the version, launch Windows PowerShell and enter: terraform -version.

10. Explain the Provisioners in Terraform.

Provisioners are used to model specific actions on the local machine or on a remote machine in order to prepare servers or other infrastructure objects for service.

11. What is the difference between Terraform and CloudFormation?

CloudFormation covers almost all bits and parts of AWS. Terraform covers the most important AWS resources as well. But on top of that Terraform can provision infrastructure at other cloud providers as well as 3rd party services

12. What is the null resource in Terraform?

The null_resource resource implements the standard resource lifecycle but takes no further action. The triggers argument allows specifying an arbitrary set of values that, when changed, will cause the resource to be replaced.

13. How do you use count terraform?

we just use [count. index] to dynamically specify the current iteration of the script!

14. What is a terraform provider?

Terraform is used to create, manage, and update infrastructure resources such as physical machines, VMs, network switches, containers, and more. A provider is responsible for understanding API interactions and exposing resources.

15. List Some notable applications of Terraform.
List some of the notable applications of Terraform.

  1. Heroku App setup
  2. Self-service clusters
  3. Development of multi-tier applications
  4. Creation of disposable environments
  5. Multi-cloud deployment
  6. Resource schedulers
  7. Developing software demos

16. Where is terraform D?

Terraform. d/plugins on most operating systems and %APPDATA%\terraform. d\plugins on Windows. By default, terraform init searches the following directories for plugins.

Thank you,
References:-
Top 10 on Medium Terraform Interview Questions
Read more Terraform Online Interview Questions
For Freshers & Experienced Terraform Interview Questions
Courseya provides latest Terraform Interview Questions

Top comments (1)

Collapse
 
maverickmarmot profile image
Amal

Very helpful, thanks
slackchannels.com/cogeco-outages/