Spring 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 / 9
Total 299 questions

How could you reference an attribute from the vsphere_datacenter data source for use with the datacenter_id argument within the vsphere_folder resource in the following configuration?

A.

Data.vsphere_datacenter.DC.id

B.

Vsphere_datacenter.dc.id

C.

Data,dc,id

D.

Data.vsphere_datacenter,dc

If you update the version constraint in your Terraform configuration, Terraform will update your lock file the next time you run terraform Init.

A.

True

B.

False

You cannot install third party plugins using terraform init.

A.

True

B.

False

What is the purpose of the terraform.lock.hcl file in Terraform?

A.

There is no such file.

B.

Storing references to workspaces, which are locked.

C.

Preventing Terraform runs from occurring.

D.

Tracking specific provider dependencies.

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

You have a simple Terraform configuration containing one virtual machine (VM) in a cloud provider. You run terraform apply and the VM is created successfully. What will happen if you terraform apply again immediately afterward without changing any Terraform code?

A.

Terraform will terminate and recreate the VM.

B.

Terraform will create another duplicate VM.

C.

Terraform will apply the VM to the state file.

D.

Nothing

You want to use API tokens and other secrets within your team's Terraform workspaces. Where does HashiCorp recommend you store these sensitive values?

(Pick 3 correct responses)

A.

In a plaintext document on a shared drive.

B.

In a terraform.tfvars file, checked into version control.

C.

In a terraform.tfvars file, securely managed and shared with your team.

D.

In an HCP Terraform/Terraform Cloud variable, with the sensitive option checked.

E.

In HashiCorp Vault.

Exhibit:

data "vsphere_datacenter" "dc" {}

resource "vsphere_folder" "parent" {

path = "Production"

type = "vm"

datacenter_id = _________

}

You want to pass the id of the vsphere_datacenter data source to the datacenter_id argument of the vsphere_folder resource. Which reference would you use?

A.

data.vsphere_datacenter.de.id

B.

vsphere_datacenter.dc.id

C.

data.vsphere_datacenter.dc

D.

data.de.id

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

Before you can use a new backend or HCP Terraform/Terraform Cloud integration, you must first execute terraform init.

A.

True

B.

False