Month End Special Sale 75% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: sale75best

Free HashiCorp Terraform-Associate-004 Practice Exam with Questions & Answers | Set: 2

Questions 11

If you don’t use the local Terraform backend, where else can Terraform save resource state?

Options:
A.

In a remote location configured in the terraform block, such as HCP Terraform or a cloud storage system.

B.

In a remote location configured in the -terraformrc file, such as HCP Terraform or a cloud storage system.

C.

In memory.

D.

In an environment variable.

HashiCorp Terraform-Associate-004 Premium Access
Questions 12

terraform plan updates your state file.

Options:
A.

True

B.

False

Questions 13

In a Terraform Cloud workpace linked to a version control repository speculative plan rum start automatically commit changes to version control.

Options:
A.

True

B.

False

Questions 14

You have a saved execution plan containing desired changes for infrastructure managed by Terraform. After running the command terraform apply my.tfplan, you receive the error shown in the exhibit below.

Exhibit:

Error: Saved plan is stale

The given plan file can no longer be applied because the state was changed by another operation after the plan was created.

How can you apply the desired changes? (Choose TWO correct answers)

Options:
A.

Update the current plan file using the terraform state push command.

B.

Refresh the current state data using the -refresh-only flag.

C.

Force the apply command by adding the flag -lock=false.

D.

Generate a new execution plan file with terraform plan, and apply the new plan.

E.

Run terraform apply without the saved execution plan.

Questions 15

Exhibit:

resource " aws_instance " " example " {

ami = " ami-0a123456789abcdef "

instance_type = " t3.micro "

}

You are updating a child module with the resource block shown in the exhibit. The public_ip attribute of the resource needs to be accessible to the parent module. How do you meet this requirement?

Options:
A.

Create an output in the child module.

B.

Add a data source to the parent module.

C.

Add an import block to the parent module.

D.

Create a local value in the child module.

Questions 16

A module block used in your configuration is shown in the exhibit. You have been asked to update the version of this module from 4.2.1 to 5.0.0.

Exhibit:

module " compute " {

source = " Azure/compute/azurerm "

version = " 4.2.1 "

}

Which two steps must you take to accomplish this?

Options:
A.

Run the terraform init command.

B.

Run the terraform pull command.

C.

Update the version argument in the module block.

D.

Remove the version argument from the module block.

Questions 17

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 18

Which of the following does terraform apply change after you approve the execution plan? (Choose two.)

Options:
A.

Cloud infrastructure

B.

The .terraform directory

C.

The execution plan

D.

State file

E.

Terraform code

Questions 19

The terraform output command shows outputs from child modules.

Options:
A.

True

B.

False

Questions 20

Which of the following command would be use to access all of the attributes and details of a resource managed by Terraform?

Options:
A.

Terraform state show ‘ provider_type_name

B.

Terraform state list

C.

Terraform get provider_type_name

D.

Terraform state list provider_type_name