Spring Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 70track

Free HashiCorp Terraform-Associate-004 Practice Exam with Questions & Answers

Questions 1

Which are examples of infrastructure as code? Choose two correct answers.

Options:
A.

Cloned virtual machine images

B.

Versioned configuration files

C.

Change management database records

D.

Doctor files

HashiCorp Terraform-Associate-004 Premium Access
Questions 2

terraform validate uses provider APIs to verify your infrastructure settings.

Options:
A.

True

B.

False

Questions 3

Before you can use a new backend or HCP Terraform/Terraform Cloud integration, you must first execute terraform init.

Options:
A.

True

B.

False

Questions 4

You created infrastructure outside the Terraform workflow that you now want to manage using Terraform. Which command brings the infrastructure into Terraform state?

Options:
A.

terraform get

B.

terraform refresh

C.

terraform import

D.

terraform init

Questions 5

Which of the following should you put into the required_providers block?

Options:
A.

version >= 3.1

B.

version = “>= 3.1”

C.

version ~> 3.1

Questions 6

Which of the following can you do with terraform plan? (Pick 2 correct responses)

Options:
A.

Schedule Terraform to run at a planned time in the future.

B.

View the execution plan and check if the changes match your expectations.

C.

Save a generated execution plan to apply later.

D.

Execute a plan in a different workspace.

Questions 7

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

Options:
A.

True

B.

False

Questions 8

You ate making changes to existing Terraform code to add some new infrastructure. When is the best time to run terraform validate?

Options:
A.

After you run terraform apply so you can validate your infrastructure

B.

Before you run terraform apply so you can validate your provider credentials

C.

Before you run terraform plan so you can validate your code syntax

D.

After you run terraform plan so you can validate that your state file is consistent with your infrastructure

Questions 9

You add a new provider to your configuration and immediately run terraform apply in the CD using the local backend. Why does the apply fail?

Options:
A.

The Terraform CD needs you to log into Terraform Cloud first

B.

Terraform requires you to manually run terraform plan first

C.

Terraform needs to install the necessary plugins first

D.

Terraform needs you to format your code according to best practices first

Questions 10

You add a new resource to an existing Terraform configuration, but do not update the version constraint in the configuration. The existing and new resources use the same provider. The working contains a .terraform.lock, hc1 file.

How will Terraform choose which version of the provider to use?

Options:
A.

Terraform will use the version recorded in your lock file

B.

Terraform will use the latest version of the provider for the new resource and the version recorded in the lock file to manage existing resources

C.

Terraform will check your state file to determine the provider version to use

D.

Terraform will use the latest version of the provider available at the time you provision your new resource