Top Terraform Interview Questions (2021) | CodeUsingJava
















Most frequently asked Terraform Interview Questions


  1. What is Terraform?
  2. What are the two components of terraform?
  3. How are data sources used in Terraform?
  4. Why is Terraform Used for DevOps?
  5. Name some competitors of Terraform?
  6. Explain the architecture of terraform?
  7. What are the Built-in Provisioners available in Terraform?
  8. What are the commands used by Terraform init?
  9. What are the primary responsibilities of Terraform Core?
  10. What is a provider in Terraform? Enlist some Terraform Providers.
  11. What is the Meaning of Terragrunt?
  12. What do you mean by IaC?


What is Terraform?

Terraform is used for building an infrastructure safe and efficient.It can manage the leading and popular services providers as well as custom in house solutions.
Features of Terraform are:
Infrastructure as Code
Execution Plans
Resource Graph
Change Automation


What are the two components of terraform?


terraform

How are data sources used in Terraform?

Data sources helps us by providing information about entities which are not managed by the current Terraform configuration.Once we figure out a data source we can use it elsewhere in our terraform configuration.

Why is Terraform Used for DevOps?

Terraform is used for developing the infrastructure with a suitable coding structure.It works efficiently and supports all cloud providers such as GCP, Azure, etc.
Terraform is like a puppet and ansible that helps to have control over complete orchestration.
It can be easily managed as it has a dynamic infrastructure as the configuration can be changed smoothly.

Name some competitors of Terraform?

Kubernetes.
Packer.
Cloud Foundry.
Pulumi.
Chef.
Jenkins.
Serverless.

Explain the architecture of terraform?


terraform


What are the Built-in Provisioners available in Terraform?

There are many provisioners available:
chef Provisioner
file Provisioner
habitat Provisioner
local-exec Provisioner
puppet Provisioner

What are the commands used by Terraform init?

Plugin Installation
Child Module Installation
Backend Initialization


What are provisioners in Terraform?

Provisioners are used for executing scripts commands to model specific actions on local machine.Provisioners add complexity to the terraform.

What are the primary responsibilities of Terraform Core?

The primary responsibilities of the Terraform Core are as follows:
  • Resource state management
  • Communication with plugins over RPC
  • Plan execution
  • Infrastructure as code

What is a provider in Terraform? Enlist some Terraform Providers.

Provider is liable for exposing resources and understanding of API interactions. Terraform providers are:
IaaS services : Examples are DigitalOcean, Linode, Rackspace, AWS.
PaaS services : Examples are Google App Engine, Apache Stratos, OpenShift.
SaaS services : Examples are Cisco WebEx, Concur, GoToMeeting.


What is the Meaning of Terragrunt?

Terragrunt is used as a covering layer and is thin in nature, is used to cover terraform.It helps in implementing all the practicies which are advocated and vetted under terraform.
Terragrunt is a one time thing that helps to write codes on terraform and it also deletes the duplicate code.

What do you mean by IaC?

Iac is a system by which all the developers can maintain the computer data centers automatically by not getting into the manual process.
Infrastructure as Code(Iac) is critical for:
Cloud computing
IaaS
DevOps