HASHICORP CERTIFIED: TERRAFORM ASSOCIATE (003) | EXAM QUESTIONS AND
ANSWERS - 100% VERIFIED - LATEST 2026 /2027 GUARANTEED PASS
1. What command initializes a Terraform working directory?
A. terraform plan
B. terraform apply
C. terraform init
D. terraform validate
ANSWER : C. terraform init
2. Which file extension is used for Terraform configuration files?
A. .tf
B. .terraform
C. .hcl
D. .tfvars
ANSWER : A. .tf
3. What is the purpose of terraform plan?
A. Apply infrastructure changes
B. Preview changes before applying
C. Destroy infrastructure
D. Initialize working directory
ANSWER : B. Preview changes before applying
4. Where does Terraform store state by default?
A. In Terraform Cloud
B. In a remote backend
C. In a local terraform.tfstate file
D. In a .terraform directory
ANSWER : C. In a local terraform.tfstate file
5. What does the terraform apply command do?
A. Previews changes
B. Destroys all resources
, C. Executes the planned changes to reach the desired state
D. Validates syntax
ANSWER : C. Executes the planned changes to reach the desired state
6. Which block type is used to declare a provider in Terraform?
A. resource
B. provider
C. module
D. data
ANSWER : B. provider
7. What is a Terraform provider?
A. A cloud vendor's pricing model
B. A plugin that manages a specific set of resource types
C. A configuration file format
D. A state management tool
ANSWER : B. A plugin that manages a specific set of resource types
8. What command is used to destroy Terraform-managed infrastructure?
A. terraform delete
B. terraform remove
C. terraform destroy
D. terraform terminate
ANSWER : C. terraform destroy
9. What is a Terraform module?
A. A single resource block
B. A container for multiple resources that are used together
C. A provider configuration
D. A backend configuration
ANSWER : B. A container for multiple resources that are used together
10. Which command validates the syntax of Terraform configuration files?
A. terraform check
B. terraform lint
C. terraform validate
D. terraform test
, ANSWER : C. terraform validate
11. What is the Terraform Registry?
A. A local directory for storing providers
B. A public repository for Terraform modules and providers
C. A state management service
D. A secret management tool
ANSWER : B. A public repository for Terraform modules and providers
12. Which Terraform block is used to declare input variables?
A. locals
B. output
C. variable
D. data
ANSWER : C. variable
13. How do you reference a variable named 'region' in Terraform?
A. $region
B. var.region
C. variable.region
D. ${region}
ANSWER : B. var.region
14. What is the purpose of output values in Terraform?
A. To store sensitive data
B. To expose information about your infrastructure for use by other
configurations
C. To define resource dependencies
D. To configure providers
ANSWER : B. To expose information about your infrastructure for use by
other configurations
15. What is a remote backend in Terraform?
A. A provider that manages remote resources
B. A location where Terraform stores state remotely
C. A module hosted in a remote repository
D. A remote execution environment
ANSWER : B. A location where Terraform stores state remotely
, 16. What does the terraform fmt command do?
A. Validates syntax
B. Formats Terraform code to a canonical style
C. Applies formatting changes to infrastructure
D. Initializes a workspace
ANSWER : B. Formats Terraform code to a canonical style
17. Which of the following is a valid Terraform data type?
A. integer
B. float
C. string
D. char
ANSWER : C. string
18. What is the function of the locals block in Terraform?
A. Define external variables
B. Assign a name to an expression for reuse within the module
C. Configure provider settings
D. Define resource dependencies
ANSWER : B. Assign a name to an expression for reuse within the module
19. What is Terraform Cloud?
A. A provider for cloud services
B. A SaaS platform for running Terraform with collaboration features
C. A local development environment
D. An open-source version of Terraform
ANSWER : B. A SaaS platform for running Terraform with collaboration
features
20. What command shows the current Terraform state?
A. terraform status
B. terraform show
C. terraform list
D. terraform inspect
ANSWER : B. terraform show
21. What is a data source in Terraform?
ANSWERS - 100% VERIFIED - LATEST 2026 /2027 GUARANTEED PASS
1. What command initializes a Terraform working directory?
A. terraform plan
B. terraform apply
C. terraform init
D. terraform validate
ANSWER : C. terraform init
2. Which file extension is used for Terraform configuration files?
A. .tf
B. .terraform
C. .hcl
D. .tfvars
ANSWER : A. .tf
3. What is the purpose of terraform plan?
A. Apply infrastructure changes
B. Preview changes before applying
C. Destroy infrastructure
D. Initialize working directory
ANSWER : B. Preview changes before applying
4. Where does Terraform store state by default?
A. In Terraform Cloud
B. In a remote backend
C. In a local terraform.tfstate file
D. In a .terraform directory
ANSWER : C. In a local terraform.tfstate file
5. What does the terraform apply command do?
A. Previews changes
B. Destroys all resources
, C. Executes the planned changes to reach the desired state
D. Validates syntax
ANSWER : C. Executes the planned changes to reach the desired state
6. Which block type is used to declare a provider in Terraform?
A. resource
B. provider
C. module
D. data
ANSWER : B. provider
7. What is a Terraform provider?
A. A cloud vendor's pricing model
B. A plugin that manages a specific set of resource types
C. A configuration file format
D. A state management tool
ANSWER : B. A plugin that manages a specific set of resource types
8. What command is used to destroy Terraform-managed infrastructure?
A. terraform delete
B. terraform remove
C. terraform destroy
D. terraform terminate
ANSWER : C. terraform destroy
9. What is a Terraform module?
A. A single resource block
B. A container for multiple resources that are used together
C. A provider configuration
D. A backend configuration
ANSWER : B. A container for multiple resources that are used together
10. Which command validates the syntax of Terraform configuration files?
A. terraform check
B. terraform lint
C. terraform validate
D. terraform test
, ANSWER : C. terraform validate
11. What is the Terraform Registry?
A. A local directory for storing providers
B. A public repository for Terraform modules and providers
C. A state management service
D. A secret management tool
ANSWER : B. A public repository for Terraform modules and providers
12. Which Terraform block is used to declare input variables?
A. locals
B. output
C. variable
D. data
ANSWER : C. variable
13. How do you reference a variable named 'region' in Terraform?
A. $region
B. var.region
C. variable.region
D. ${region}
ANSWER : B. var.region
14. What is the purpose of output values in Terraform?
A. To store sensitive data
B. To expose information about your infrastructure for use by other
configurations
C. To define resource dependencies
D. To configure providers
ANSWER : B. To expose information about your infrastructure for use by
other configurations
15. What is a remote backend in Terraform?
A. A provider that manages remote resources
B. A location where Terraform stores state remotely
C. A module hosted in a remote repository
D. A remote execution environment
ANSWER : B. A location where Terraform stores state remotely
, 16. What does the terraform fmt command do?
A. Validates syntax
B. Formats Terraform code to a canonical style
C. Applies formatting changes to infrastructure
D. Initializes a workspace
ANSWER : B. Formats Terraform code to a canonical style
17. Which of the following is a valid Terraform data type?
A. integer
B. float
C. string
D. char
ANSWER : C. string
18. What is the function of the locals block in Terraform?
A. Define external variables
B. Assign a name to an expression for reuse within the module
C. Configure provider settings
D. Define resource dependencies
ANSWER : B. Assign a name to an expression for reuse within the module
19. What is Terraform Cloud?
A. A provider for cloud services
B. A SaaS platform for running Terraform with collaboration features
C. A local development environment
D. An open-source version of Terraform
ANSWER : B. A SaaS platform for running Terraform with collaboration
features
20. What command shows the current Terraform state?
A. terraform status
B. terraform show
C. terraform list
D. terraform inspect
ANSWER : B. terraform show
21. What is a data source in Terraform?