Summer Sale Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: ecus65

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

Page: 2 / 7
Total 226 questions

You have just developed a new Terraform configuration for two virtual machines with a cloud provider. You would like to create the infrastructure for the first time.

Which Terraform command should you runfirst?

A.

terraform apply

B.

terraform init

C.

terraform plan

D.

terraform show

When using a remote backend or terraform Cloud integration, where does Terraform save resource sate?

A.

In an environment variable

B.

On the disk

C.

In the remote backend or Terraform Cloud

D.

In memory

Using the terraform state rm command against a resource will destroy it.

A.

True

B.

False

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

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.

You must use different Terraform commands depending on the cloud provider you use.

A.

True

B.

False

What is the provider for the resource shown in the Exhibit?

resource "aws_vpc" "main" {

name = "test"

}

A.

VPC

B.

test

C.

main

D.

aws

You have created a main.tf Terraform configuration consisting of an application server, a database and a load balanced. You ran terraform apply and Terraform created all of the resources successfully.

Now you realize that you do not actually need the load balancer, so you run terraform destroy without any flags. What will happen?

A.

Terraform will prompt you to pick which resource you want to destroy

B.

Terraform will destroy the application server because it is listed first in the code

C.

Terraform will prompt you to confirm that you want to destroy all the infrastructure

D.

Terraform will destroy the main, tf file

E.

Terraform will immediately destroy all the infrastructure

Which provider authentication method prevents credentials from being stored in the state file?

A.

Using environment variables

B.

Specifying the login credentials in the provider block

C.

Setting credentials as Terraform variables

D.

None of the above

terraform plan updates your state file.

A.

True

B.

False