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

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

Viewing page 8 out of 10 pages
Viewing questions 71-80 out of questions
Questions # 71:

When using Terraform to deploy resources into Azure, which scenarios are true regarding state files? (Choose two.)

Options:

A.

When you change a Terraform-managed resource via the Azure Cloud Console, Terraform updates the state file to reflect the change during the next plan or apply


B.

Changing resources via the Azure Cloud Console records the change in the current state file


C.

When you change a resource via the Azure Cloud Console, Terraform records the changes in a new state file


D.

Changing resources via the Azure Cloud Console does not update current state file


Expert Solution
Questions # 72:

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.

You have a saved execution plan containing desired changes for infrastructure managed by Terraform. After running terraform apply my.tfplan, you receive the error shown. How can you apply the desired changes? (Pick the 2 correct responses below.)

Options:

A.

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


B.

Run terraform apply without the saved execution plan.


C.

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


D.

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


E.

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


Expert Solution
Questions # 73:

Your security team scanned some Terraform workspaces and found secrets stored in plaintext in state files. How can you protect that data?

Options:

A.

Edit your state file to scrub out the sensitive data


B.

Always store your secrets in a secrets.tfvars file


C.

Delete the state file every time you run Terraform


D.

Store the state in an encrypted backend


Expert Solution
Questions # 74:

Which command add existing resources into Terraform state?

Options:

A.

Terraform init


B.

Terraform plan


C.

Terraform refresh


D.

Terraform import


E.

All of these


Expert Solution
Questions # 75:

You created infrastructure outside the Terraform workflow that you now want to manage using Terraform. Which command brings the infrastructure into Terraform state?

Options:

A.

terraform get


B.

terraform refresh


C.

terraform import


D.

terraform init


Expert Solution
Questions # 76:

You use a cloud provider account that is shared with other team members. You previously used Terraform to create a load balancer that listens on port 80. After application changes, you updated the Terraform code to change the port to 443.

You run terraform plan and see that the execution plan shows the port changing from 80 to 443 like you intended and step away to grab some coffee.

In the meantime, another team member manually changes the load balancer port to 443 through the cloud provider console before you get back to your desk.

What will happen when you run terraform apply upon returning to your desk?

Options:

A.

Terraform will recreate the load balancer.


B.

Terraform will fail with an error because the state file is no longer accurate.


C.

Terraform will change the load balancer port to 80, and then change it back to 443.


D.

Terraform will not make any changes to the load balancer and will update the state file to reflect the manual change.


Expert Solution
Questions # 77:

Which of the following is not a benefit of adopting infrastructure as code?

Options:

A.

Versioning


B.

A Graphical User Interface


C.

Reusability of code


D.

Automation


Expert Solution
Questions # 78:

Variables declared within a module are accessible outside of the module.

Options:

A.

True


B.

False


Expert Solution
Questions # 79:

Which method for sharing Terraform modules fulfills the following criteria:

Keeps the module configurations confidential within your organization.

Supports Terraform ' s semantic version constraints.

Provides a browsable directory of your modules.

Options:

A.

A Git repository containing your modules.


B.

Public Terraform module registry.


C.

A subfolder within your workspace.


D.

HCP Terraform/Terraform Cloud private registry.


Expert Solution
Questions # 80:

Which of the following is availableonlyinHCP Terraform workspacesandnot in Terraform CLI?

Options:

A.

Dry runs with terraform plan.


B.

Secure variable storage.


C.

Using one workspace ' s state as a data source for another.


D.

Support for multiple cloud providers.


Expert Solution
Viewing page 8 out of 10 pages
Viewing questions 71-80 out of questions