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

HashiCorp Terraform-Associate-004 - HashiCorp Certified: Terraform Associate (004) (HCTA0-004)

Page: 1 / 10
Total 318 questions

As a member of an operations team that uses infrastructure as code (lac) practices, you are tasked with making a change to an infrastructure stack running in a public cloud. Which pattern would follow laC best practices for making a change?

A.

Make the change via the public cloud API endpoint

B.

Clone the repository containing your infrastructure code and then run the code

C.

Use the public cloud console to make the change after a database record has been approved

D.

Make the change programmatically via the public cloud CLI

E.

Submit a pull request and wait for an approved merge of the proposed changes

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

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.

Select the command that doesn’t cause Terraform to refresh its state.

A.

Terraform destroy

B.

Terraform apply

C.

Terraform plan

D.

Terraform state list

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

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

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

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.

What is the name of the default file where Terraform stores the state?

Type your answer in the field provided. The text field is not case-sensitive and all variations of the correct answer are accepted.

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?

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.

Terraform installs its providers during which phase?

A.

Plan

B.

Init

C.

Refresh

D.

All of the above

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

A.

terraform get

B.

terraform refresh

C.

terraform import

D.

terraform init

Which command doesnotcause Terraform to refresh its state?

A.

terraform state list

B.

terraform plan

C.

terraform apply

D.

terraform destroy