New Year Sale 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: exams65

ExamsBrite Dumps

HashiCorp Certified: Terraform Associate (003) (HCTA0-003) Question and Answers

HashiCorp Certified: Terraform Associate (003) (HCTA0-003)

Last Update Jan 14, 2026
Total Questions : 253

We are offering FREE Terraform-Associate-003 HashiCorp exam questions. All you do is to just go and sign up. Give your details, prepare Terraform-Associate-003 free exam questions and then go for complete pool of HashiCorp Certified: Terraform Associate (003) (HCTA0-003) test questions that will help you more.

Terraform-Associate-003 pdf

Terraform-Associate-003 PDF

$36.75  $104.99
Terraform-Associate-003 Engine

Terraform-Associate-003 Testing Engine

$43.75  $124.99
Terraform-Associate-003 PDF + Engine

Terraform-Associate-003 PDF + Testing Engine

$57.75  $164.99
Questions 1

What is a key benefit of the Terraform state file?

Options:

A.  

A state file can schedule recurring infrastructure tasks

B.  

A state file is a source of truth for resources provisioned with Terraform

C.  

A state file is a source of truth for resources provisioned with a public cloud console

D.  

A state file is the desired state expressed by the Terraform code files

Discussion 0
Questions 2

Which command add existing resources into Terraform state?

Options:

A.  

Terraform init

B.  

Terraform plan

C.  

Terraform refresh

D.  

Terraform import

E.  

All of these

Discussion 0
Questions 3

A developer on your team is going lo 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]

Discussion 0
Questions 4

Which option cannot be used to keep secrets out of Terraform configuration files?

Options:

A.  

A Terraform provider

B.  

Environment variables

C.  

A -var flag

D.  

secure string

Discussion 0
Questions 5

What is one disadvantage of using dynamic blocks in Terraform?

Options:

A.  

Dynamic blocks can construct repeatable nested blocks

B.  

Terraform will run more slowly

C.  

They cannot be used to loop through a list of values

D.  

They make configuration harder to read and understand

Discussion 0
Questions 6

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

Options:

A.  

Dynamic

B.  

For_each

C.  

Nesting

D.  

repeated.

Discussion 0
Questions 7

Which parameters does terraform import require? Choose two correct answers.

Options:

A.  

Provider

B.  

Resource ID

C.  

Resource address

D.  

Path

Discussion 0
Questions 8

Which of the following is not a valid Terraform variable type?

Options:

A.  

list

B.  

array

C.  

nap

D.  

string

Discussion 0
Questions 9

You've used Terraform to deploy a virtual machine and a database. You want to replace this virtual machine instance with an identical one without affecting the database. What is the best way to achieve this using Terraform?

Options:

A.  

Use the terraform state rm command to remove the VM from state file

B.  

Use the terraform taint command targeting the VMs then run terraform plan and terraform apply

C.  

Use the terraform apply command targeting the VM resources only

D.  

Delete the Terraform VM resources from your Terraform code then run terraform plan and terraform apply

Discussion 0
Questions 10

Which of the following are advantages of using infrastructure as code (laC) instead of provisioning with a graphical user interface (GUI)? Choose two correct answers.

Options:

A.  

Prevents manual modifications to your resources

B.  

Lets you version, reuse, and share infrastructure configuration

C.  

Secures your credentials

D.  

Provisions the same resources at a lower cost

E.  

Reduces risk of operator error

Discussion 0
Questions 11

Which of these are features of HCP Terraform/Terraform Cloud? Pick the 2 correct responses below.

Options:

A.  

Automated infrastructure deployment visualization.

B.  

A web-based user interface (UI).

C.  

Automatic backups of configuration and state.

D.  

Remote state storage.

Discussion 0
Questions 12

Which of the following ate advantages of using infrastructure as code (laC) instead of provisioning with a graphical user interface (GUI)? Choose two correct answers.

Options:

A.  

Lets you version, reuse, and share infrastructure configuration

B.  

Provisions the same resources at a lower cost

C.  

Secures your credentials

D.  

Reduces risk of operator error

E.  

Prevents manual modifications to your resources

Discussion 0
Questions 13

Which are examples of infrastructure as code? Choose two correct answers.

Options:

A.  

Cloned virtual machine images

B.  

Versioned configuration files

C.  

Change management database records

D.  

Doctor files

Discussion 0
Questions 14

In a Terraform Cloud workspace linked to a version control repository, speculative plan runs start automatically when you merge or commit changes to version control.

Options:

A.  

True

B.  

False

Discussion 0
Questions 15

Which of the following is not a valid Terraform collection type?

Options:

A.  

Tree

B.  

Map

C.  

List

D.  

set

Discussion 0
Questions 16

If a module declares a variable without a default value, you must pass the value of the variable within the module block when you call the module in your configuration.

Options:

A.  

True

B.  

False

Discussion 0
Questions 17

Your risk management organization requires that new AWS S3 buckets must be private and encrypted at rest. How can Terraform Cloud automatically and proactively enforce this security control?

Options:

A.  

Auditing cloud storage buckets with a vulnerability scanning tool

B.  

By adding variables to each Terraform Cloud workspace to ensure these settings are always enabled

C.  

With an S3 module with proper settings for buckets

D.  

With a Sentinel policy, which runs before every apply

Discussion 0
Questions 18

A senior admin accidentally deleted some of your cloud instances. What will Terraform do when you run terraform apply?

Options:

A.  

Tear down the entire workspace's infrastructure and rebuild it.

B.  

Build a completely brand new set of infrastructure.

C.  

Rebuild only the instances that were deleted.

D.  

Stop and generate an error message about the missing instances.

Discussion 0
Questions 19

You much initialize your working directory before running terraform validate.

Options:

A.  

True

B.  

False

Discussion 0
Questions 20

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

Discussion 0
Questions 21

Which of these are features of HCP Terraform/Terraform Cloud? (Pick the 2 correct responses)

Options:

A.  

Automatic backups of configuration and state.

B.  

Remote state storage.

C.  

Automated infrastructure deployment visualization.

D.  

A web-based user interface (UI).

Discussion 0
Questions 22

What does Terraform not reference when running a terraform apply -refresh-only ?

Options:

A.  

State file

B.  

Credentials

C.  

Cloud provider

D.  

Terraform resource definitions in configuration files

Discussion 0
Questions 23

Where does the Terraform local backend store its state?

Options:

A.  

In the terraform file

B.  

In the /tmp directory

C.  

In the terraform,tfstate file

D.  

In the user’s terraform,state file

Discussion 0
Questions 24

What type of information can be found on the Terraform Registry when using published modules?

Options:

A.  

Required input variables.

B.  

Outputs.

C.  

Optional input variables and default values.

D.  

All of the above.

Discussion 0
Questions 25

terraform apply is failing with the following error. What next step should you take to determine the root cause of the problem?

Error:

yaml

CopyEdit

Error loading state: AccessDenied: Access Denied

status code: 403, request id: 288766CE5CCA24A0, host id: web.example.com

Options:

A.  

Run terraform login to reauthenticate with the provider.

B.  

Set TF_LOG=DEBUG.

C.  

Review /var/log/terraform.log for error messages.

D.  

Review syslog for Terraform error messages.

Discussion 0
Questions 26

You used Terraform to create an ephemeral development environment in the cloud and are now ready to destroy all the infrastructure described by your Terraform configuration. To be safe, you would like to first see all the infrastructure that Terraform will delete.

Which command should you use to show all the resources that will be deleted? (Pick the 2 correct responses)

Options:

A.  

Runterraform destroy. This will output all the resources that will be deleted before prompting for approval.

B.  

Runterraform show -destroy.

C.  

Runterraform state rm *.

Discussion 0
Questions 27

You can access state stored with the local backend by using terraform_remote_state data source.

Options:

A.  

True

B.  

False

Discussion 0
Questions 28

Select the command that doesn’t cause Terraform to refresh its state.

Options:

A.  

Terraform destroy

B.  

Terraform apply

C.  

Terraform plan

D.  

Terraform state list

Discussion 0
Questions 29

Terraform providers are always installed from the Internet.

Options:

A.  

True

B.  

False

Discussion 0
Questions 30

When do changes invoked by terraform apply take effect?

Options:

A.  

After Terraform has updated the state file.

B.  

Once the resource provider has fulfilled the request.

C.  

Immediately.

D.  

None of the above are correct.

Discussion 0
Questions 31

What does terraform import do?

Options:

A.  

Imports existing resources into the state file

B.  

Imports all infrastructure from a given cloud provider

C.  

Imports a new Terraform module

D.  

Imports clean copies of tainted resources

E.  

None of the above

Discussion 0
Questions 32

In a HCP Terraform/Terraform Cloud workspace linked to a version control repository, speculative plan runs start automatically when you merge or commit changes to version control.

Options:

A.  

True

B.  

False

Discussion 0
Questions 33

Multiple team members are collaborating on infrastructure using Terraform and want to format the* Terraform code following standard Terraform-style convention.

How should they ensure the code satisfies conventions?

Options:

A.  

Terraform automatically formats configuration on terraform apply

B.  

Run terraform validate prior to executing terraform plan or terraform apply

C.  

Use terraform fmt

D.  

Replace all tabs with spaces

Discussion 0
Questions 34

A module block is shown in the Exhibit space of this page. When you use a module block to reference a module from the Terraform Registry such as the one in the example, how do you specify version 1.0.0 of the module?

Options:

A.  

Append ?ref=v1.0.0 argument to the source path.

B.  

You cannot. Modules stored on the public Terraform Registry do not support versioning.

C.  

Add a version = "1.0.0" attribute to the module block.

D.  

Nothing. Modules stored on the public Terraform module Registry always default to version 1.0.0.

Discussion 0
Questions 35

All modules published on the official Terraform Module Registry have been verified by HasihCorp.

Options:

A.  

True

B.  

False

Discussion 0
Questions 36

Why does this backend configuration not follow best practices?

Options:

A.  

An alias meta-argument should be included in backend blocks whenever possible

B.  

You should use the local enhanced storage backend whenever possible

C.  

You should not store credentials in Terraform configuration

D.  

The backend configuration should contain multiple credentials so that more than one user can execute terraform plan and terraform apply

Discussion 0
Questions 37

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

Discussion 0
Questions 38

The public Terraform Module Registry is free to use.

Options:

A.  

True

B.  

False

Discussion 0
Questions 39

It is best practice to store secret data in the same version control repository as your Terraform configuration.

Options:

A.  

True

B.  

False

Discussion 0
Questions 40

Define the purpose of state in Terraform.

Options:

A.  

State maps real world resources to your configuration and keeps track of metadata

B.  

State lets you enforce resource configurations that relate to compliance policies

C.  

State stores variables and lets you quickly reuse existing code

D.  

State codifies the dependencies of related resources

Discussion 0
Questions 41

Which method for sharing Terraform configurations fulfills the following criteria:

1. Keeps the configurations confidential within your organization

2. Support Terraform’s semantic version constrains

3. Provides a browsable directory

Options:

A.  

Subfolder within a workspace

B.  

Generic git repository

C.  

Terraform Cloud private registry

D.  

Public Terraform module registry

Discussion 0
Questions 42

Variables declared within a module are accessible outside of the module.

Options:

A.  

True

B.  

False

Discussion 0
Questions 43

How can a ticket-based system slow down infrastructure provisioning and limit the ability to scale? Choose two correct answers.

Options:

A.  

End-users have to request infrastructure changes

B.  

Ticket based systems generate a full audit trail of the request and fulfillment process

C.  

Users can access catalog of approved resources from drop down list in a request form

D.  

The more resources your organization needs, the more tickets your infrastructure team has to process

Discussion 0
Questions 44

Which of these statements about HCP Terraform/Terraform Cloud workspaces is false?

Options:

A.  

They can securely store cloud credentials.

B.  

They have role-based access controls.

C.  

Plans and applies can be triggered via version control system integrations.

D.  

You must use the CLI to switch between workspaces.

Discussion 0
Questions 45

What feature stops multiple users from operating on the Terraform state at the same time?

Options:

A.  

State locking

B.  

Version control

C.  

Provider constraints

D.  

Remote backends

Discussion 0
Questions 46

terraform init retrieves and caches the configuration for all remote modules.

Options:

A.  

True

B.  

False

Discussion 0
Questions 47

What value does the Terraform Cloud private registry provide over the public Terraform Module Registry?

Options:

A.  

The ability to share modules publicly with any user of Terraform

B.  

The ability to restrict modules to members of Terraform Cloud or Enterprise organizations

C.  

The ability to tag modules by version or release

D.  

The ability to share modules with public Terraform users and members of Terraform Cloud Organizations

Discussion 0
Questions 48

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

Options:

A.  

True

B.  

False

Discussion 0
Questions 49

Before you can use a remote backend, you must first execute terra-form init.

Options:

A.  

True

B.  

False

Discussion 0
Questions 50

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

Options:

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

Discussion 0
Questions 51

You modified your Terraform configuration to fix a typo in the resource ID by renaming it from photoes to photos. What configuration will you add to update the resource ID in state without destroying the existing resource?

Original configuration:

resource "aws_s3_bucket" "photoes" {

bucket_prefix = "images"

}

Updated configuration:

resource "aws_s3_bucket" "photos" {

bucket_prefix = "images"

}

Options:

A.  

moved {

from = aws_s3_bucket.photoes

to = aws_s3_bucket.photos

}

B.  

moved {

bucket.photoes = aws_s3_bucket.photos

}

C.  

moved {

aws_s3_bucket.photoes = aws_s3_bucket.photos

}

D.  

None. Terraform will automatically update the resource I

D.  

Discussion 0
Questions 52

Which of these ate features of Terraform Cloud? Choose two correct answers.

Options:

A.  

Automated infrastructure deployment visualization

B.  

Automatic backups

C.  

A web-based user interface (Ul)

D.  

Remote state storage

Discussion 0
Questions 53

Terraform installs its providers during which phase?

Options:

A.  

Plan

B.  

Init

C.  

Refresh

D.  

All of the above

Discussion 0
Questions 54

You can develop a custom provider to manage its resources using Terraform.

Options:

A.  

True

B.  

False

Discussion 0
Questions 55

Setting the TF_LOG environment variable to DEBUG causes debug messages to be logged into stdout.

Options:

A.  

True

B.  

False

Discussion 0
Questions 56

Which Terraform collection type should you use to store key/value pairs?

Options:

A.  

Set

B.  

Map

C.  

Tuple

D.  

list

Discussion 0
Questions 57

Which of these are features of Terraform Cloud? Choose two correct answers.

Options:

A.  

A web-based user interface (Ul)

B.  

Automated infrastructure deployment visualization

C.  

Automatic backups

D.  

Remote state storage

Discussion 0
Questions 58

Which of the following command would be use to access all of the attributes and details of a resource managed by Terraform?

Options:

A.  

Terraform state show ‘ provider_type_name

B.  

Terraform state list

C.  

Terraform get provider_type_name

D.  

Terraform state list provider_type_name

Discussion 0
Questions 59

Which of the following methods, used to provision resources into a public cloud, demonstrates the concept of infrastructure as code?

Options:

A.  

curl commands manually run from a terminal

B.  

A sequence of REST requests you pass to a public cloud API endpoint Most Voted

C.  

A script that contains a series of public cloud CLI commands

D.  

A series of commands you enter into a public cloud console

Discussion 0
Questions 60

You have deployed a new webapp with a public IP address on a cloud provider. However, you did not create any outputs for your code. What is the best method to quickly find the IP address of the resource you deployed?

Options:

A.  

In a new folder, use the terraform_remote_state data source to load in the state file, then write an output for each resource that you find the state file

B.  

Run terraform state list to find the name of the resource, then terraform state show to find the attributes including public IP address

C.  

Run terraform output ip_address to view the result

D.  

Run terraform destroy then terraform apply and look for the IP address in stdout

Discussion 0
Questions 61

You decide to move a Terraform state file to Amazon S3 from another location. You write the code below into a file called backend.tf.

Which command will migrate your current state file to the new S3 remote backend?

Options:

A.  

terraform state

B.  

terraform init

C.  

terraform push

D.  

terraform refresh

Discussion 0
Questions 62

Module version is required to reference a module on the Terraform Module Registry.

Options:

A.  

True

B.  

False

Discussion 0
Questions 63

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

Options:

A.  

chomp

B.  

join

C.  

slice

D.  

split

Discussion 0
Questions 64

One remote backend configuration always maps to a single remote workspace.

Options:

A.  

True

B.  

False

Discussion 0
Questions 65

What is modified when executing Terraform inrefresh-only mode?

Options:

A.  

Your Terraform configuration.

B.  

Your Terraform plan.

C.  

Your state file.

D.  

Your cloud infrastructure.

Discussion 0
Questions 66

Which of these sources can Terraform use to download modules?

Options:

A.  

Local path

B.  

GitHub repository

C.  

Terraform Registry

D.  

HTTP URLs

E.  

All of the above

Discussion 0
Questions 67

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

Discussion 0
Questions 68

What is a Terraform provider not responsible for?

Options:

A.  

Provisioning infrastructure in multiple cloud providers.

B.  

Managing actions to take based on resource differences.

C.  

Managing resources and data sources based on an API.

D.  

Understanding API interactions with a hosted service.

Discussion 0
Questions 69

Only the user that generated a plan may apply it.

Options:

A.  

True

B.  

False

Discussion 0
Questions 70

Any user can publish modules to the public Terraform Module Registry.

Options:

A.  

True

B.  

False

Discussion 0
Questions 71

You are working on some new application features and you want to spin up a copy of your production deployment to perform some quick tests. In order to avoid having to configure a new state backend, what open source Terraform feature would allow you create multiple states but still be associated with your current code?

Options:

A.  

Terraform data sources

B.  

Terraform local values

C.  

Terraform modules

D.  

Terraform workspaces

E.  

None of the above

Discussion 0
Questions 72

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

Options:

A.  

version ~> 3.1

B.  

version >= 3.1

C.  

version = ">= 3.1"

Discussion 0
Questions 73

As a member of an operations team that uses infrastructure as code (lac) practices, you are tasked with making a change to an infrastructure stack running in a public cloud. Which pattern would follow laC best practices for making a change?

Options:

A.  

Make the change via the public cloud API endpoint

B.  

Clone the repository containing your infrastructure code and then run the code

C.  

Use the public cloud console to make the change after a database record has been approved

D.  

Make the change programmatically via the public cloud CLI

E.  

Submit a pull request and wait for an approved merge of the proposed changes

Discussion 0
Questions 74

Which two steps are required to provision new infrastructure in the Terraform workflow? Choose two correct answers.

Options:

A.  

Plan

B.  

Import

C.  

Alidate

D.  

Init

E.  

apply

Discussion 0
Questions 75

terraform apply will fail if you have not run terraform plan first to update the plan output.

Options:

A.  

True

B.  

False

Discussion 0