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

Viewing page 7 out of 8 pages
Viewing questions 61-70 out of questions
Questions # 61:

Multiple team members are collaborating on infrastructure using Terraform and want to format the* Terraform code following standard Terraform-style convention.

How should they ensure the code satisfies conventions?

Options:

A.

Terraform automatically formats configuration on terraform apply


B.

Run terraform validate prior to executing terraform plan or terraform apply


C.

Use terraform fmt


D.

Replace all tabs with spaces


Expert Solution
Questions # 62:

You have declared a variable called var.list which is a list of objects that all have an attribute id . Which options will produce a list of the IDs? Choose two correct answers.

Options:

A.

[ var.list [ * ] , id ]


B.

[ for o in var.list : o.Id ]


C.

var.list[*].id


D.

{ for o in var.llst : o => o.id }


Expert Solution
Questions # 63:

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


Expert Solution
Questions # 64:

A Terraform backend determines how Terraform loads state and stores updates when you execute which command?

Options:

A.

apply


B.

destroy


C.

Both of these are correct.


D.

Neither of these are correct.


Expert Solution
Questions # 65:

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 # 66:

Only the user that generated a plan may apply it.

Options:

A.

True


B.

False


Expert Solution
Questions # 67:

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 # 68:

What are some benefits of using Sentinel with Terraform Cloud/Terraform Cloud? Choose three correct answers.

Options:

A.

You can restrict specific resource configurations, such as disallowing the use of CIDR=0.0.0.0/0.


B.

You can check out and check in cloud access keys


C.

Sentinel Policies can be written in HashiCorp Configuration Language (HCL)


D.

Policy-as-code can enforce security best practices


E.

You can enforce a list of approved AWS AMIs


Expert Solution
Questions # 69:

What is the purpose of the terraform.lock.hcl file in Terraform?

Options:

A.

There is no such file.


B.

Storing references to workspaces, which are locked.


C.

Preventing Terraform runs from occurring.


D.

Tracking specific provider dependencies.


Expert Solution
Questions # 70:

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.


Expert Solution
Viewing page 7 out of 8 pages
Viewing questions 61-70 out of questions