MYHOSPITALNOW.COM

Find Trusted Doctors & Hospitals

Discover healthcare providers, compare hospitals, and explore treatment options worldwide.

Free Treatment Quotes • Doctor Search • Hospital Comparison

Find Healthcare Options

www.myhospitalnow.com

Terraform Interview Questions and Answer – Set 1

External data sources must return information in what format?

  • A. XML
  • B. HTML
  • C. JSON
  • D. YAML

Ans: C. JSON

Which of the following is an example of Source Control Management software?

  • A. Jenkins
  • B. Visual Studio Code
  • C. Docker
  • D. Git

Ans: D. Git

Why would you use a partial configuration for a backend?

  • A. So that you can store your AWS credentials in the configuration
  • B. To make it simpler to change the backend storage type to a new service
  • C. So that the remainder of configuration can be defined the variables
  • D. To allow backend configuration data to be defined at runtime

Ans: D. To allow backend configuration data to be defined at runtime

What environment variable lets Terraform know it’s running in an automation context?

  • A. TF_AUTO_YES
  • B. TF_IN_AUTOMATION
  • C. TF_AUTOMATION
  • D. TF_AUTOMATION_TRUE

Ans: B. TF_IN_AUTOMATION

What is special about the default workspace?

  • A. It is removed when you create your first workspace.
  • B. It cannot be deleted.
  • C. You cannot select it.
  • D. It is named after the main configuration file.

Ans: B. It cannot be deleted.

What are the four common components of Configuration Management systems?

  • A. Get, Test, Set, Put
  • B. Authorization, Accounting, Auditing, and Access
  • C. Normalization, Comparison, Accounting, and Validation
  • D. Identification, Control, Accounting, and Verification

Ans: D. Identification, Control, Accounting, and Verification

Which Ansible command executes a playbook?

  • A. ansible-run-playbook
  • B. ansible-run
  • C. ansible-execute
  • D. ansible-playbook

Ans: D. ansible-playbook

What is the purpose of running the terraform init command?

  • A. Init will download the required plugins and modules for the configuration.
  • B. Init is an optional command to configure aliases.
  • C. Init will remove any existing resources from previous deployments.
  • D. Init will create new configuration files for you to populate.

Ans: A. Init will download the required plugins and modules for the configuration.

What does the import command do?

  • A. Imports a text file containing values to be used in the configuration
  • B. Imports an existing, unmanaged resource into the Terraform configuration
  • C. Creates a new Terraform configuration for unmanaged resources
  • D. Imports the settings from a previous Terraform installation

Ans: B. Imports an existing, unmanaged resource into the Terraform configuration

What type of request does the HTTP data source use?

  • A. PUT
  • B. POST
  • C. LIST
  • D. GET

Ans: D. GET

What command is being deprecated in favor of workspaces?

  • A. Production
  • B. Environment
  • C. Posture
  • D. Staging

Ans: B. Environment

Which option tells Terraform to use a local directory for plugins?

  • A. -plugin-dir=
  • B. -plugin-local=
  • C. -plugin-source=
  • D. -init-dir=

Ans: A. -plugin-dir=

What format does a rendered template take?

  • A. Map
  • B. String
  • C. JSON
  • D. List

Ans: B. String

Why would you use the option ‘-input=false’ when running terraform init?

  • A. It disables the use of variable files for input.
  • B. It ensures that Terraform only generates output.
  • C. It prevents Terraform from import files.
  • D. It prevents Terraform from prompting the user for input.

Ans: D. It prevents Terraform from prompting the user for input.

What format are ansible files written in?

  • A. JSON
  • B. HTML
  • C. YAML
  • D. XML

Ans: C. YAML

What is one benefit of using an immutable deployment?

  • A. Instances are never patched or upgraded in-place.
  • B. Instances and infrastructure are never redeployed.
  • C. It offloads all work to configuration management software.
  • D. Images are generalized and configured after the instance is created.

Ans: A. Instances are never patched or upgraded in-place.

Where can you find official modules to use with Terraform?

  • A. You must create your own
  • B. On the provider’s website
  • C. You have to request them from Hashicorp
  • D. On the Terraform module repository

Ans: D. On the Terraform module repository

In the import command, what do the ADDR and ID fields represent?

  • A. ADDR is the Terraform identifier; ID is the provider identifier.
  • B. ADDR is the name of the key; ID is the value of the key.
  • C. ADDR is the loopback address; ID is the static IP address.
  • D. ID is the Terraform identifier; ADDR is the provider identifier.

Ans: A. ADDR is the Terraform identifier; ID is the provider identifier.

How is the source for a template defined?

  • A. On the Terraform website
  • B. Using a map generated by Terraform
  • C. By pulling from GitHub
  • D. Either in-line or from a file

Ans: D. Either in-line or from a file

What command must be run to configure the backend in Terraform?

  • A. terraform backend
  • B. terraform fmt
  • C. terraform plan
  • D. terraform init

Ans: D. terraform init

Find Trusted Cardiac Hospitals

Compare heart hospitals by city and services — all in one place.

Explore Hospitals
I'm Rajesh Kumar, a DevOps, SRE, DevSecOps, Cloud, and Platform Engineering expert passionate about sharing practical knowledge, real-world experiences, and industry best practices. I have worked at Cotocus and regularly write about technology, travel, investing, health, product reviews, and digital marketing through my various platforms. I publish technical articles at DevOps School, travel stories at Holiday Landmark, stock market insights at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at TrueReviewNow, and SEO and digital marketing strategies at Wizbrand.

Related Posts

Debugging Terraform + Helm Drift on EKS: Failure Behaviours and Fixes

A field tutorial based on a real incident removing a stale CriticalAddonsOnly toleration from metrics-server and KEDA on EKS Auto Mode clusters managed by Terraform Cloud (TFC) + the eks-blueprints-addons module. TL;DR We tried to…

Read More

Terraform Architecture and Components through diagram

Terraform Architecture & End-to-End Workflow This reference architecture covers the standard Terraform CLI workflow, including execution from a developer machine or CI/CD runner. It shows the relationship…

Read More

Terraform workspace explained!!!

What is Terraform workspace? Have you worked with terraform workflow? such as terraform init/plan/apply/destroy with terraform configuration file? If Yes, you already have worked with Terraform workspace….

Read More

Terraform Backend Tutorial

Terraform is a popular open-source infrastructure as code tool used to create and manage infrastructure resources. The state of the infrastructure resources managed by Terraform is stored…

Read More

Complete Guide to HashiCorp Terraform Certification

Hashicorp Terraform is understood as the standard tool for managing modern cloud environments through code. It is defined as a software that allows for the creation and…

Read More

Terraform: Step‑By‑Step: Use Local CLI to Modify Remote State in TFE

Below is a step‑by‑step tutorial for using the Terraform CLI against a VCS‑connected HCP/TFE workspace, plus a command catalog for all the common remote actions. Step‑By‑Step: Use…

Read More