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

Free HashiCorp Terraform-Associate-004 Practice Exam with Questions & Answers | Set: 5

Questions 41

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

HashiCorp Terraform-Associate-004 Premium Access
Questions 42

You have never used Terraform before and would like to test it out using a shared team account for a cloud provider. The shared team account already contains 15 virtual machines (VM). You develop a Terraform configuration containing one VM. perform terraform apply, and see that your VM was created successfully. What should you do to delete the newly-created VM with Terraform?

Options:
A.

The Terraform state file contains all 16 VMs in the team account. Execute terraform destroy and select the newly-created VM.

B.

Delete the Terraform state file and execute terraform apply.

C.

The Terraform state file only contains the one new VM. Execute terraform destroy.

D.

Delete the VM using the cloud provider console and terraform apply to apply the changes to the Terraform state file.

Questions 43

When using multiple configuration of the same Terraform provider, what meta-argument must you include in any non-default provider configurations?

Options:
A.

Alias

B.

Id

C.

Depends_on

D.

name

Questions 44

Which task does terraform init not perform?

Options:
A.

Validates all required variables are present

B.

Sources any modules and copies the configuration locally

C.

Connects to the backend

D.

Sources all providers used in the configuration and downloads them

Questions 45

What feature stops multiple users from operating on the Terraform state at the same time?

Options:
A.

State locking

B.

Version control

C.

Provider constraints

D.

Remote backends

Questions 46

Before you can use a remote backend, you must first execute terra-form init.

Options:
A.

True

B.

False

Questions 47

In a Terraform Cloud workspace linked to a version control repository, speculative plan runs start automatically when you merge or commit changes to version control.

Options:
A.

True

B.

False

Questions 48

Which are benefits of migrating from a local state backend to a remote backend? (Pick the 2 correct responses below.)

Options:
A.

Guarantees that configuration drift cannot occur for the managed infrastructure.

B.

Eliminates the need to manage credentials when deploying infrastructure to multiple cloud providers.

C.

Faster plan and apply execution because the state is cached locally on the cloud provider.

D.

State locking that allows multiple team members to safely work on the same infrastructure.

E.

The ability to enable server-side encryption at rest.

Questions 49

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.

Questions 50

terraform validate uses provider APIs to verify your infrastructure settings.

Options:
A.

True

B.

False