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

Free HashiCorp Terraform-Associate-003 Practice Exam with Questions & Answers | Set: 4

Questions 31

When you use a backend that requires authentication, it is best practice to:

Options:
A.

Run all Terraform commands on a shared server or container.

B.

Configure the authentication credentials in your Terraform configuration files, and store them in version control.

C.

Use environment variables to configure authentication credentials outside of your Terraform configuration.

D.

None of the above.

HashiCorp Terraform-Associate-003 Premium Access
Questions 32

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

Questions 33

What is a Terraform provider not responsible for?

Options:
A.

Provisioning infrastructure in multiple cloud providers.

B.

Managing actions to take based on resource differences.

C.

Managing resources and data sources based on an API.

D.

Understanding API interactions with a hosted service.

Questions 34

Which of the following should you add in the required_providers block to define a provider version constraint?

Options:
A.

version

B.

version = "3.1"

C.

version: 3.1

D.

version - 3.1

Questions 35

All modules published on the official Terraform Registry are maintained and tested by HashiCorp.

Options:
A.

True

B.

False

Questions 36

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.

Questions 37

When you initialize Terraform, where does it cache modules from the public Terraform Registry?

Options:
A.

In the /tmp directory.

B.

In the .terraform sub-directory.

C.

In memory.

D.

They are not cached.

Questions 38

Terraform configuration can only import modules from the public registry.

Options:
A.

True

B.

False

Questions 39

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 40

Which of the following is not a way to trigger terraform destroy?

Options:
A.

Using the destroy command with auto-approve.

B.

Passing --destroy at the end of a plan request.

C.

Running terraform destroy from the correct directory and then typing yes when prompted in the CLI.