Summer Certification Sale 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: save70

Download Full Version Terraform-Associate-004 HashiCorp Exam

HashiCorp Certified: Terraform Associate (004) (HCTA0-004) Questions and Answers

Question 57

You’ve just finished refactoring part of your Terraform workspace’s configuration to use a module to manage some of your resources. When you plan your changes, you notice that Terraform will destroy and recreate the affected resources. Doing so could cause unintended downtime in the application your workspace manages. What supported approach should you take to complete the refactor without destroying and recreating your resources?

Options:

A.

Add moved blocks to your configuration to let Terraform know the new resource addresses for the affected resources.

B.

Run the terraform console command to edit your workspace ' s state and update the resource names.

C.

Manually edit your terraform.tfstate file and update the resource names.

D.

Open your cloud provider ' s console and rename the affected resources.

Question 58

What is the workflow for deploying new infrastructure with Terraform?

Options:

A.

Write Terraform configuration, run terraform init to initialize the working directory orworkspace, and run terraform apply

B.

Write Terraform configuration, run terraform show to view proposed changes, and terraform apply to create new infrastructure

C.

Write Terraform configuration, run terraform apply to create infrastructure, use terraform validate to confirm Terraform deployed resources correctly

D.

Write Terraform configuration, run terraform plan to initialize the working directory or workspace, and terraform apply to create the infrastructure

Question 59

Terraform providers are always installed from the Internet.

Options:

A.

True

B.

False

Question 60

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.