Pre-Winter Sale Special Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: force70

Pass the HashiCorp Terraform Associate Terraform-Associate-004 Questions and answers with CertsForce

Viewing page 2 out of 12 pages
Viewing questions 11-20 out of questions
Questions # 11:

You want to know from which paths Terraform is loading providers referenced in your Terraform configuration (* files). You need to enable additional logging messages to find this out. Which of the following would achieve this?

Options:

A.

Set verbose for each provider in your Terraform configuration


B.

Set the environment variable TF_LOG_TRACE


C.

Set the environment variable TF_LOG_PATH


D.

Set the environment variable TF_log_TRACE


Expert Solution
Questions # 12:

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


Expert Solution
Questions # 13:

What is the purpose of state locking in a remote backend?

Options:

A.

Encrypts the state in the remote backend.


B.

Requires every instance of Terraform to use the same provider version.


C.

Creates a backup of the state file in a secure location.


D.

Ensures only one instance of Terraform can modify the state at a time.


Expert Solution
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.


Expert Solution
Questions # 15:

You have created a main.tf Terraform configuration consisting of an application server, a database and a load balanced. You ran terraform apply and Terraform created all of the resources successfully.

Now you realize that you do not actually need the load balancer, so you run terraform destroy without any flags. What will happen?

Options:

A.

Terraform will prompt you to pick which resource you want to destroy


B.

Terraform will destroy the application server because it is listed first in the code


C.

Terraform will prompt you to confirm that you want to destroy all the infrastructure


D.

Terraform will destroy the main, tf file


E.

Terraform will immediately destroy all the infrastructure


Expert Solution
Questions # 16:

When does Terraform create the .terraform.lock.hc1 file?

Options:

A.

After your first terraform plan


B.

After your first terraform apply


C.

After your first terraform init


D.

When you enable state locking


Expert Solution
Questions # 17:

You corrected a typo in a resource name, changing it from aws_s3_bucket.photoes to aws_s3_bucket.photos. You want to update the Terraform state so that the existing resource is recognized under the new name, without destroying and recreating it. Which configuration should you use?

Options:

A.

Remove the old resource from your configuration and re-import it.


B.

Run terraform apply -refresh-only.


C.

Do nothing — Terraform will automatically update the state.


D.

Add a moved block to your configuration.


Expert Solution
Questions # 18:

A terraform apply can not _________ infrastructure.

Options:

A.

change


B.

destroy


C.

provision


D.

import


Expert Solution
Questions # 19:

If a DevOps team adopts AWS CloudFormation as their standardized method for provisioning public cloud resoruces, which of the following scenarios poses a challenge for this team?

Options:

A.

The team is asked to manage a new application stack built on AWS-native services


B.

The organization decides to expand into Azure wishes to deploy new infrastructure


C.

The team is asked to build a reusable code based that can deploy resources into any AWS region


D.

The DevOps team is tasked with automating a manual, web console-based provisioning.


Expert Solution
Questions # 20:

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


Expert Solution
Viewing page 2 out of 12 pages
Viewing questions 11-20 out of questions