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

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

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

A developer accidentally launched a VM (virtual machine) outside of the Terraform workflow and ended up with two servers with the same name. They don ' t know which VM Terraform manages but do have a list of all active VM IDs.

Which of the following methods could you use to discover which instance Terraform manages?

Options:

A.

Run terraform state list to find the names of all VMs, then run terraform state show for each of them to find which VM ID Terraform manages


B.

Update the code to include outputs for the ID of all VMs, then run terraform plan to view the outputs


C.

Run terraform taint/code on all the VMs to recreate them


D.

Use terraform refresh/code to find out which IDs are already part of state


Expert Solution
Questions # 32:

Which argument can you set on a module block to prevent Terraform from updating the module’s configuration during an init or get operation?

Options:

A.

version


B.

lifecycle


C.

count


D.

source


Expert Solution
Questions # 33:

A developer on your team is going to leaf down an existing deployment managed by Terraform and deploy a new one. However, there is a server resource named aws instant.ubuntu[l] they would like to keep. What command should they use to tell Terraform to stop managing that specific resource?

Options:

A.

Terraform plan rm:aws_instance.ubuntu[1]


B.

Terraform state rm:aws_instance.ubuntu[1]


C.

Terraform apply rm:aws_instance.ubuntu[1]


D.

Terraform destory rm:aws_instance.ubuntu[1]


Expert Solution
Questions # 34:

Which of the following is not a key principle of infrastructure as code?

Options:

A.

Self-describing infrastructure


B.

Idempotence


C.

Versioned infrastructure


D.

Golden images


Expert Solution
Questions # 35:

Why would you use the -replace flag for terraform apply?

Options:

A.

You want Terraform to ignore a resource on the next apply


B.

You want Terraform to destroy all the infrastructure in your workspace


C.

You want to force Terraform to destroy a resource on the next apply


D.

You want to force Terraform to destroy and recreate a resource on the next apply


Expert Solution
Questions # 36:

You can install community and partner plugins using terraform init.

Options:

A.

True


B.

False


Expert Solution
Questions # 37:

What does state looking accomplish?

Options:

A.

Prevent accidental Prevent accident deletion of the state file


B.

Blocks Terraform commands from modifying, the state file


C.

Copies the state file from memory to disk


D.

Encrypts any credentials stored within the state file


Expert Solution
Questions # 38:

What is the provider for this resource?

Options:

A.

Vpc


B.

Test


C.

Main


D.

aws


Expert Solution
Questions # 39:

You have a list of numbers that represents the number of free CPU cores on each virtual cluster:

numcpus = [ 18, 3, 7, 11, 2 ]

What Terraform function could you use to select the largest number from the list?

Options:

A.

top(numcpus)


B.

max(numcpus)


C.

ceil (numcpus)


D.

hight[numcpus]


Expert Solution
Questions # 40:

One cloud block always maps to a single HCP Terraform/Terraform Cloud workspace.

Options:

A.

True


B.

False


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