TERRAFORM ASSOCIATE STUDY SET
EXAM 2025/2026 QUESTIONS AND
ANSWERS 100% PASS
Who developed Terraform? - ANS Hashicorp
What is Terraform used for? - ANS Infrastructure as code
When defining resources in Terraform, you could say it is written in a way that is? -
ANS Declarative
What is Terraform written in? - ANS HashiCorp Configuration Language (HCL) or JSON
Can you compare the abilities of Terraform and Ansible? - ANS Terraform is better for setting
up infrastructure, and Ansible is better for configuring that infrastructure
What are the two inputs of Terraform? - ANS The terraform config, and the current state
The `terraform{}` block contains what? - ANS Terraform settings
What does the `provider{}` block do in Terraform? - ANS Configures providers
1 @COPYRIGHT 2025/2026
,What does a `resource{}` block do in Terraform? - ANS Defines components of your
infrastructure
What is a provider in Terraform? - ANS It is a plugin that enables interaction with an API
What does the `terraform output` command do? - ANS It will return the outputs you defined
in `outputs.tf`
What is the file name for outputs in terraform? - ANS outputs.tf
What is a `locals block` in Terraform? - ANS It is used to define local variables for that module
What is an output in Terraform? - ANS It selects fields that you want to see come back from
a Terraform apply
Why is `terraform init` not sufficient to test your code? - ANS Because it is only interested in
the terrafor, provider and module blocks
If you wanted to run a bash script on your new server using terraform, how would you do it? -
ANS With the custom_data tag
"Why shouldn't you store the terraform state file in git?" - ANS "Because other people
working with Terraform wouldn't know the current state of terraform, and the file contains
secrets"
"How to hide your state files so that they don't appear on disk when using Terraform?" -
ANS Have a remote state storage solution (backend)
2 @COPYRIGHT 2025/2026
, What is Terraform state? - ANS How Terraform tracks changes made in your cloud instances
"What is the Terraform ""backend""?" - ANS Your remote storage state solution
What is Infrastructure as Code (IaC)? - ANS The practice of managing and provisioning
infrastructure resources using code
What are the advantages of IaC patterns? {{c1::automation}} {{c2::consistency}}
{{c3::scalability}} {{c4::version control}} - ANS
What is the purpose of version control in IaC? - ANS It allows for tracking of infrastructure
configurations over time
How does IaC improve collaboration among teams? - ANS Teams can work together by using
a shared, version-controlled codebase for infrastructure management
How does IaC provide scalability? - ANS Through automating the provisioning and scaling of
infrastructure resources
How does IaC provide consistency? - ANS By using infrastructure configurations that are
deployed in a repeatable way
What is the benefit of Terraform being multi-cloud and provider-agnostic? - ANS Increased
reliability
How does using Terraform with multiple cloud providers increase your reliability? - ANS "If
one provider goes down, all of your infrastructure isn't affected"
3 @COPYRIGHT 2025/2026
EXAM 2025/2026 QUESTIONS AND
ANSWERS 100% PASS
Who developed Terraform? - ANS Hashicorp
What is Terraform used for? - ANS Infrastructure as code
When defining resources in Terraform, you could say it is written in a way that is? -
ANS Declarative
What is Terraform written in? - ANS HashiCorp Configuration Language (HCL) or JSON
Can you compare the abilities of Terraform and Ansible? - ANS Terraform is better for setting
up infrastructure, and Ansible is better for configuring that infrastructure
What are the two inputs of Terraform? - ANS The terraform config, and the current state
The `terraform{}` block contains what? - ANS Terraform settings
What does the `provider{}` block do in Terraform? - ANS Configures providers
1 @COPYRIGHT 2025/2026
,What does a `resource{}` block do in Terraform? - ANS Defines components of your
infrastructure
What is a provider in Terraform? - ANS It is a plugin that enables interaction with an API
What does the `terraform output` command do? - ANS It will return the outputs you defined
in `outputs.tf`
What is the file name for outputs in terraform? - ANS outputs.tf
What is a `locals block` in Terraform? - ANS It is used to define local variables for that module
What is an output in Terraform? - ANS It selects fields that you want to see come back from
a Terraform apply
Why is `terraform init` not sufficient to test your code? - ANS Because it is only interested in
the terrafor, provider and module blocks
If you wanted to run a bash script on your new server using terraform, how would you do it? -
ANS With the custom_data tag
"Why shouldn't you store the terraform state file in git?" - ANS "Because other people
working with Terraform wouldn't know the current state of terraform, and the file contains
secrets"
"How to hide your state files so that they don't appear on disk when using Terraform?" -
ANS Have a remote state storage solution (backend)
2 @COPYRIGHT 2025/2026
, What is Terraform state? - ANS How Terraform tracks changes made in your cloud instances
"What is the Terraform ""backend""?" - ANS Your remote storage state solution
What is Infrastructure as Code (IaC)? - ANS The practice of managing and provisioning
infrastructure resources using code
What are the advantages of IaC patterns? {{c1::automation}} {{c2::consistency}}
{{c3::scalability}} {{c4::version control}} - ANS
What is the purpose of version control in IaC? - ANS It allows for tracking of infrastructure
configurations over time
How does IaC improve collaboration among teams? - ANS Teams can work together by using
a shared, version-controlled codebase for infrastructure management
How does IaC provide scalability? - ANS Through automating the provisioning and scaling of
infrastructure resources
How does IaC provide consistency? - ANS By using infrastructure configurations that are
deployed in a repeatable way
What is the benefit of Terraform being multi-cloud and provider-agnostic? - ANS Increased
reliability
How does using Terraform with multiple cloud providers increase your reliability? - ANS "If
one provider goes down, all of your infrastructure isn't affected"
3 @COPYRIGHT 2025/2026