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 | Set: 4

Questions 31

Where does the Terraform local backend store its state?

Options:
A.

In the terraform file

B.

In the /tmp directory

C.

In the terraform,tfstate file

D.

In the user’s terraform,state file

HashiCorp Terraform-Associate-004 Premium Access
Questions 32

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

Questions 33

What is the purpose of the .terraform directory in a Terraform workspace?

Options:
A.

The directory is where Terraform creates and maintains the state file to track the underlying resources it creates and manages.

B.

The directory is used to convert and store Terraform configuration files into API calls to communicate with the targeted platform.

C.

The directory contains the provider credentials and the .tfvars files to prevent them from being committed to version control by accident.

D.

The directory contains plugins and modules that Terraform downloads during initialization, along with other important information.

Questions 34

What is the provider for the resource shown in the Exhibit?

resource " aws_vpc " " main " {

name = " test "

}

Options:
A.

VPC

B.

test

C.

main

D.

aws

Questions 35

terraform apply will fail if you have not run terraform plan first to update the plan output.

Options:
A.

True

B.

False

Questions 36

What’s the proper syntax for the plan command?

Options:
A.

terraform apply -var-file=tfplan

B.

terraform plan -target=tfplan

C.

terraform plan -generate-config-out=tfplan

D.

terraform plan -out=tfplan

Questions 37

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 38

The HCP Terraform private registry keeps the module configurations confidential within your organization.

Options:
A.

True

B.

False

Questions 39

You have just developed a new Terraform configuration for two virtual machines with a cloud provider. You would like to create the infrastructure for the first time.

Which Terraform command should you runfirst?

Options:
A.

terraform apply

B.

terraform init

C.

terraform plan

D.

terraform show

Questions 40

Which of the following is true about terraform apply?(Pick 2 correct responses)

Options:
A.

You must pass the output of a terraform plan command to it.

B.

By default, it does not refresh your state file to reflect the current infrastructure configuration.

C.

Depending on provider specification, Terraform may need to destroy and recreate your infrastructure resources.

D.

You cannot target specific resources for the operation.

E.

It only operates on infrastructure defined in the current working directory or workspace.