Spring Sale 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: Board70

Terraform-Associate-004 Exam Dumps - HashiCorp Terraform Associate Questions and Answers

Question # 74

What type of block is used to construct a collection of nested configuration blocks?

Options:

A.

Dynamic

B.

For_each

C.

Nesting

D.

repeated.

Buy Now
Question # 75

What Terraform command always causes a state file to be updated with changes that might have been made outside of Terraform?

Options:

A.

Terraform plan –refresh-only

B.

Terraform show –json

C.

Terraform apply –lock-false

D.

Terraform plan target-state

Buy Now
Question # 76

You are writing a child Terraform module that provisions an AWS instance. You want to reference the IP address returned by the child module in the root configuration. You name the instance resource "main'.

Which of these is the correct way to define the output value?

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Question # 77

Which command should you run to check if all code in a Terraform configuration that references multiple modules is properly formatted without making changes?

Options:

A.

terraform fmt -write-false

B.

terraform fmt -list -recursive

C.

terraform fmt -check -recursive

D.

terraform fmt -check

Buy Now
Question # 78

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

Options:

A.

version

B.

version = "3.1"

C.

version: 3.1

D.

version - 3.1

Buy Now
Question # 79

You're building a CI/CD (continuous integration/continuous delivery) pipeline and need to inject sensitive variables into your Terraform run. How can you do this safely?

Options:

A.

Copy the sensitive variables into your Terraform code

B.

Store the sensitive variables in a secure_varS.tf file

C.

Store the sensitive variables as plain text in a source code repository

D.

Pass variables to Terraform with a -var flag

Buy Now
Question # 80

A provider configuration block is required in every Terraform configuration.

Example:

Options:

A.

True

B.

False

Buy Now
Question # 81

When do you need to explicitly execute Terraform in refresh-only mode?

Options:

A.

Before every terraform plan.

B.

Before every terraform apply.

C.

Before every terraform import.

D.

None of the above.

Buy Now
Question # 82

Exhibit:

resource "kubernetes_namespace" "example" {

name = "test"

}

A resource block is shown in the exhibit. How would you reference the name attribute of this resource in HCL?

Options:

A.

kubernetes_namespace.example,name

B.

kubernetes_namespace.test.name

C.

data.kubernetes_namespace.name

D.

resource.kubernetes_namespace.example.name

Buy Now
Question # 83

What does terraform destroy do?

Options:

A.

Destroys all infrastructure in the Terraform state file.

B.

Destroys all Terraform code files in the current directory, leaving the state file intact.

C.

Destroys all infrastructure in the configured Terraform provider.

D.

Destroys the Terraform state file, leaving the infrastructure intact.

Buy Now
Exam Name: HashiCorp Certified: Terraform Associate (004) (HCTA0-004)
Last Update: Feb 20, 2026
Questions: 299
Terraform-Associate-004 pdf

Terraform-Associate-004 PDF

$25.5  $84.99
Terraform-Associate-004 Engine

Terraform-Associate-004 Testing Engine

$28.5  $94.99
Terraform-Associate-004 PDF + Engine

Terraform-Associate-004 PDF + Testing Engine

$40.5  $134.99