Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
 

HashiCorp Terraform Associate Exam Actual Questions

The questions for Terraform Associate were last updated on Nov. 17, 2024.
  • Viewing page 1 out of 36 pages.
  • Viewing questions 1-10 out of 358 questions

Topic 1 - Single Topic

Question #1 Topic 1

The terraform.tfstate file always matches your currently built infrastructure.

  • A. True
  • B. False
Reveal Solution Hide Solution   Discussion   38

Correct Answer: B 🗳️

Question #2 Topic 1

One remote backend configuration always maps to a single remote workspace.

  • A. True
  • B. False
Reveal Solution Hide Solution   Discussion   41

Correct Answer: B 🗳️

Question #3 Topic 1

How is the Terraform remote backend different than other state backends such as S3, Consul, etc.?

  • A. It can execute Terraform runs on dedicated infrastructure on premises or in Terraform Cloud
  • B. It doesn't show the output of a terraform apply locally
  • C. It is only available to paying customers
  • D. All of the above
Reveal Solution Hide Solution   Discussion   21

Correct Answer: A 🗳️

Question #4 Topic 1

What is the workflow for deploying new infrastructure with Terraform?

  • A. terraform plan to import the current infrastructure to the state file, make code changes, and terraform apply to update the infrastructure.
  • B. Write a Terraform configuration, run terraform show to view proposed changes, and terraform apply to create new infrastructure.
  • C. terraform import to import the current infrastructure to the state file, make code changes, and terraform apply to update the infrastructure.
  • D. Write a Terraform configuration, run terraform init, run terraform plan to view planned infrastructure changes, and terraform apply to create new infrastructure.
Reveal Solution Hide Solution   Discussion   23

Correct Answer: D 🗳️

Question #5 Topic 1

A provider configuration block is required in every Terraform configuration.
Example:

  • A. True
  • B. False
Reveal Solution Hide Solution   Discussion   125

Correct Answer: B 🗳️

Question #6 Topic 1

You run a local-exec provisioner in a null resource called null_resource.run_script and realize that you need to rerun the script.
Which of the following commands would you use first?

  • A. terraform taint null_resource.run_script
  • B. terraform apply -target=null_resource.run_script
  • C. terraform validate null_resource.run_script
  • D. terraform plan -target=null_resource.run_script
Reveal Solution Hide Solution   Discussion   47

Correct Answer: A 🗳️

Question #7 Topic 1

Which provisioner invokes a process on the resource created by Terraform?

  • A. remote-exec
  • B. null-exec
  • C. local-exec
  • D. file
Reveal Solution Hide Solution   Discussion   17

Correct Answer: A 🗳️

Question #8 Topic 1

Which of the following is not true of Terraform providers?

  • A. Providers can be written by individuals
  • B. Providers can be maintained by a community of users
  • C. Some providers are maintained by HashiCorp
  • D. Major cloud vendors and non-cloud vendors can write, maintain, or collaborate on Terraform providers
  • E. None of the above
Reveal Solution Hide Solution   Discussion   38

Correct Answer: E 🗳️

Question #9 Topic 1

What command does Terraform require the first time you run it within a configuration directory?

  • A. terraform import
  • B. terraform init
  • C. terraform plan
  • D. terraform workspace
Reveal Solution Hide Solution   Discussion   11

Correct Answer: B 🗳️

Question #10 Topic 1

You have deployed a new webapp with a public IP address on a cloud provider. However, you did not create any outputs for your code.
What is the best method to quickly find the IP address of the resource you deployed?

  • A. Run terraform output ip_address to view the result
  • B. In a new folder, use the terraform_remote_state data source to load in the state file, then write an output for each resource that you find the state file
  • C. Run terraform state list to find the name of the resource, then terraform state show to find the attributes including public IP address
  • D. Run terraform destroy then terraform apply and look for the IP address in stdout
Reveal Solution Hide Solution   Discussion   43

Correct Answer: C 🗳️

Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...