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: 10 / 11
Total 366 questions

When you run terraform apply -refresh-only, which of the following is not consulted by Terraform to update the state file?

A.

Terraform configuration files defining the resources.

B.

Authentication credentials for the provider.

C.

The most recent state file.

D.

The actual infrastructure as reported by the provider API.

Which of the following is not a valid source path for specifying a module?

A.

source - " github.com/hashicorp/examplePref-ul.0.8M

B.

source = " ./module?version=vl.6.0 "

C.

source - " hashicorp/consul/aws "

D.

source - " ./module "

When you use a remote backend that needs authentication, HashiCorp recommends that you:

A.

Write the authentication credentials in the Terraform configuration files

B.

Keep the Terraform configuration files in a secret store

C.

Push your Terraform configuration to an encrypted git repository

D.

Use partial configuration to load the authentication credentials outside of the Terraform code

You are creating a reusable Terraform configuration and want to include an optional billing_dept tag so your Finance team can track team-specific spending on resources. Which of the following billing_dept variable declarations will achieve this?

A.

variable " billing_dept " {default = " " }

B.

variable " billing_dept " {optional = true}

C.

variable " billing_dept " {type = optional(string)}

D.

variable " billing_dept " {type = default}

terraform destroy is the only way to remove infrastructure with Terraform.

A.

True

B.

False

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

Where does HashiCorp recommend you store API tokens and other secrets within your team’s Terraform workspaces?

Pick the three correct responses below.

A.

In a plaintext document on a shared drive.

B.

In HashiCorp Vault.

C.

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

D.

In an environment variable and referenced with TF_VAR_variablename.

E.

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

terraform validate confirms that your infrastructure matches the Terraform state file.

A.

True

B.

False

Which of the following should you add in the required_providers block to define a provider version constraint?

A.

version

B.

version = " 3.1 "

C.

version: 3.1

D.

version - 3.1

How would you reference the volume IDs associated with the ebs_block_device blocks in this configuration?

A.

aws_instance.example.ebs_block_device[sda2,sda3).volume_id

B.

aws_lnstance.example.ebs_block_device.[*].volume_id

C.

aws_lnstance.example.ebs_block_device.volume_ids

D.

aws_instance.example-ebs_block_device.*.volume_id