Terraform Interview Questions And Answers

terraform interview questions and answers   Top 11 Terraform Interview Questions And Answers

1) What is Terraform?

Terraform is a tool for building, changing, and versioning infrastructure safely and efficiently. It can manage existing and popular service providers as well as custom in-house solutions. Terraform generates an execution plan describing what it will do to reach the desired state, and then executes it to build the described infrastructure.


2) What are the key features of Terraform?

Following are the key features of Terraform:

● Infrastructure as Code
● Execution Plans
● Resource Graph
● Change Automation


3) What is Infrastructure as Code in Terraform?

Infrastructure is described using a high-level configuration syntax. It allows a blueprint of the datacenter to be versioned and treated as any other code. Additionally, infrastructure can be shared and re-used.


4) What is Execution Plans in Terraform?

Terraform has a 'planning' step where it generates an execution plan. The execution plan shows what Terraform will do when the call apply. This will avoid any surprises when Terraform manipulates infrastructure.


5) What is Resource Graph in Terraform?

Terraform builds a graph of all the resources, and parallelizes the creation and modification of any non-dependent resources. Because of this, Terraform builds infrastructure as efficiently as possible, and operators get insight into dependencies in their infrastructure.


6) What is Change Automation in Terraform?

Complex changesets can be applied to the infrastructure with minimal human interaction. With the previously mentioned execution plan and resource graph, it can be known exactly what Terraform will change and in what order, avoiding many possible human errors.


7) Can Terraform be used for on-prem infrastructure?

Yes, Terraform can be used for on-prem infrastructure. There are many providers which are available to be selected.


8) Can callbacks be used with Terraform in Azure?

Yes, callbacks can be used on Azure with terraforming with the help of the Azure Event Hubs.


9) Which all version controls are supported by Terraform?

Following are the version control supported by Terraform:

● GitHub
● GitLab CE
● GitLab EE
● Bucket cloud


10) Can the module version be locked in Terraform?

Yes, there is a way to lock it. if terraform module registry is being used as a source, then the 'version' attribute can be used in the module in a configuration file of Terraform.


11) Do Terraform support themes?

Yes. Gtk themes are efficiently supported by the 0.3.1 version of terraforming.