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 # 64

Exhibit:

resource " aws_instance " " example " {

ami = " ami-0a123456789abcdef "

instance_type = " t3.micro "

}

You are updating a child module with the resource block shown in the exhibit. The public_ip attribute of the resource needs to be accessible to the parent module. How do you meet this requirement?

Options:

A.

Create an output in the child module.

B.

Add a data source to the parent module.

C.

Add an import block to the parent module.

D.

Create a local value in the child module.

Buy Now
Question # 65

You want to define a single input variable to capture configuration values for a server. The values must represent memory as a number, and the server name as a string.

Which variable type could you use for this input?

Options:

A.

List

B.

Object

C.

Map

D.

Terraform does not support complex input variables of different types

Buy Now
Question # 66

What is an advantage of immutable infrastructure?

Options:

A.

In-place infrastructure upgrades

B.

Quicker infrastructure upgrades

C.

Automatic infrastructure upgrades

D.

Less complex infrastructure upgrades

Buy Now
Question # 67

What is terraform plan -refresh-only intended to detect?

Options:

A.

Terraform configuration code changes

B.

Corrupt state files

C.

State file drift

D.

Empty state files

Buy Now
Question # 68

When using Terraform to deploy resources into Azure, which scenarios are true regarding state files? (Choose two.)

Options:

A.

When you change a Terraform-managed resource via the Azure Cloud Console, Terraform updates the state file to reflect the change during the next plan or apply

B.

Changing resources via the Azure Cloud Console records the change in the current state file

C.

When you change a resource via the Azure Cloud Console, Terraform records the changes in a new state file

D.

Changing resources via the Azure Cloud Console does not update current state file

Buy Now
Question # 69

Which of the following is not a valid string function in Terraform?

Options:

A.

chomp

B.

join

C.

slice

D.

split

Buy Now
Question # 70

Which of the following can you do with terraform plan?

Pick the two correct responses below.

Options:

A.

Save a generated execution plan to apply later.

B.

View the execution plan and check whether the changes match your expectations.

C.

Schedule Terraform to run at a planned time in the future.

D.

Execute a plan in a different workspace.

Buy Now
Question # 71

All standard backend types support state locking, and remote operations like plan, apply, and destroy.

Options:

A.

True

B.

False

Buy Now
Question # 72

Exhibit:

Error: Saved plan is stale

The given plan file can no longer be applied because the state was changed by another operation after the plan was created.

You have a saved execution plan containing desired changes for infrastructure managed by Terraform. After running terraform apply my.tfplan, you receive the error shown. How can you apply the desired changes? (Pick the 2 correct responses below.)

Options:

A.

Generate a new execution plan file with terraform plan, and apply the new plan.

B.

Run terraform apply without the saved execution plan.

C.

Force the apply command by adding the flag -lock=false.

D.

Refresh the current state data using the -refresh-only flag.

E.

Update the current plan file using the terraform state push command.

Buy Now
Question # 73

Infrastructure as Code (laC) can be stored in a version control system along with application code.

Options:

A.

True

B.

False

Buy Now
Exam Name: HashiCorp Certified: Terraform Associate (004) (HCTA0-004)
Last Update: Apr 6, 2026
Questions: 318
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