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

Viewing page 4 out of 7 pages
Viewing questions 31-40 out of questions
Questions # 31:

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

Which command(s) adds existing resources in a public cloud into Terraform state?

Options:

A.

terraform init


B.

terraform plan


C.

terraform refresh


D.

terraform import


E.

All of these


Expert Solution
Questions # 33:

Once you configure a new Terraform backend with a terraform code block, which command(s) should you use to migrate the state file?

Options:

A.

terraform destroy, then terraform apply


B.

terraform init


C.

terraform push


D.

terraform apply


Expert Solution
Questions # 34:

You decide to move a Terraform state file to Amazon S3 from another location. You write the code below into a file called backend.tf.

Question # 34

Which command will migrate your current state file to the new S3 remote backend?

Options:

A.

terraform state


B.

terraform init


C.

terraform push


D.

terraform refresh


Expert Solution
Questions # 35:

Where in your Terraform configuration do you specify a state backend?

Options:

A.

The resource block


B.

The data source block


C.

The terraform block


D.

The provider block


Expert Solution
Questions # 36:

When do you need to explicitly execute Terraform in refresh-only mode?

Options:

A.

Before every terraform plan.


B.

Before every terraform apply.


C.

Before every terraform import.


D.

None of the above.


Expert Solution
Questions # 37:

You have used Terraform lo create an ephemeral development environment in the (loud and are now ready to destroy all the Infrastructure described by your Terraform configuration To be safe, you would like to first see all the infrastructure that Terraform will delete.

Which command should you use to show all of the resources that mil be deleted? Choose two correct answers.

Options:

A.

Run terraform state rm ‘


B.

Run terraform show :destroy


C.

Run terraform destroy and it will first output all the resource that will be deleted before prompting for approval


D.

Run terraform plan .destory


Expert Solution
Questions # 38:

How can you trigger a run in a Terraform Cloud workspace that is connected to a Version Control System (VCS) repository?

Options:

A.

Only Terraform Cloud organization owners can set workspace variables on VCS connected workspaces


B.

Commit a change to the VCS working directory and branch that the Terraform Cloud workspace is connected to


C.

Only Terraform Cloud organization owners can approve plans in VCS connected workspaces


D.

Only members of a VCS organization can open a pull request against repositories that are connected to Terraform Cloud workspaces


Expert Solution
Questions # 39:

Which of the following are advantages of using infrastructure as code (laC) instead of provisioning with a graphical user interface (GUI)? Choose two correct answers.

Options:

A.

Prevents manual modifications to your resources


B.

Lets you version, reuse, and share infrastructure configuration


C.

Secures your credentials


D.

Provisions the same resources at a lower cost


E.

Reduces risk of operator error


Expert Solution
Questions # 40:

When should you run terraform init?

Options:

A.

Every time you run terraform apply


B.

Before you start coding a new Terraform project


C.

After you run terraform plan for the time in a new terraform project and before you run terraform apply


D.

After you start coding a new terraform project and before you run terraform plan for the first time.


Expert Solution
Viewing page 4 out of 7 pages
Viewing questions 31-40 out of questions