Weekend Special Limited Time 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: netbudy65

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

Questions 4

You ate creating a Terraform configuration which needs to make use of multiple providers, one for AWS and one for Datadog. Which of the following provider blocks would allow you to do this?

A)

Terraform-Associate-003 Question 4

B)

C)

D)

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 5

You have multiple team members collaborating on infrastructure as code (IaC) using Terraform, and want to apply formatting standards for readability.

How can you format Terraform HCL (HashiCorp Configuration Language) code according to standard Terraform style convention?

Options:

A.

Run the terraform fmt command during the code linting phase of your CI/CD process Most Voted

B.

Designate one person in each team to review and format everyone's code

C.

Manually apply two spaces indentation and align equal sign "=" characters in every Terraform file (*.tf)

D.

Write a shell script to transform Terraform files using tools such as AWK, Python, and sed

Buy Now
Questions 6

Which of the following isnotan advantage of using Infrastructure as Code (IaC) operations?

Options:

A.

Self-service infrastructure deployment.

B.

Modify a count parameter to scale resources.

C.

API-driven workflows.

D.

Troubleshoot via a Linux diff command.

E.

Public cloud console configuration workflows.

Buy Now
Questions 7

Which of the following does terraform apply change after you approve the execution plan? (Choose two.)

Options:

A.

Cloud infrastructure

B.

The .terraform directory

C.

The execution plan

D.

State file

E.

Terraform code

Buy Now
Questions 8

Which of the following is not a benefit of adopting infrastructure as code?

Options:

A.

Versioning

B.

A Graphical User Interface

C.

Reusability of code

D.

Automation

Buy Now
Questions 9

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

Options:

A.

True

B.

False

Buy Now
Questions 10

terraform destroy is the only way to remove infrastructure.

Options:

A.

True

B.

False

Buy Now
Questions 11

Your root module contains a variable namednum_servers. Which is the correct way to pass its value to a child module with an input namedservers?

Options:

A.

servers = num_servers

B.

servers = var(num_servers)

C.

servers = var.num_servers

D.

servers = ${var.num_servers}

Buy Now
Questions 12

In a Terraform Cloud workpace linked to a version control repository speculative plan rum start automatically commit changes to version control.

Options:

A.

True

B.

False

Buy Now
Questions 13

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

Buy Now
Questions 14

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

Buy Now
Questions 15

Which command(s) adds existing resources in a public cloud into Terraform state?

Options:

A.

terraform init

B.

terraform plan

C.

terraform refresh

D.

terraform import

E.

All of these

Buy Now
Questions 16

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

Buy Now
Questions 17

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

Options:

A.

True

B.

False

Buy Now
Questions 18

When should you run terraform init?

Options:

A.

Every time you run terraform apply

B.

Before you start coding a new Terraform project

C.

After you run terraform plan for the time in a new terraform project and before you run terraform apply

D.

After you start coding a new terraform project and before you run terraform plan for the first time.

Buy Now
Questions 19

What does the default "local" Terraform backend store?

Options:

A.

tfplan files

B.

State file

C.

Provider plugins

D.

Terraform binary

Buy Now
Questions 20

Which of the following is not a way to trigger terraform destroy?

Options:

A.

Using the destroy command with auto-approve.

B.

Passing --destroy at the end of a plan request.

C.

Running terraform destroy from the correct directory and then typing yes when prompted in the CLI.

Buy Now
Questions 21

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

Buy Now
Questions 22

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

Options:

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

Buy Now
Questions 23

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 *.

Buy Now
Questions 24

Which of these actions are forbidden when the Terraform state file is locked? (Pick the 3 correct responses)

Options:

A.

terraform apply

B.

terraform state list

C.

terraform destroy

D.

terraform fmt

Buy Now
Questions 25

Which are forbidden actions when the terraform state file is locked? Choose three correct answers.

Options:

A.

Terraform state list

B.

Terraform destroy

C.

Terraform validate

D.

Terraform validate

E.

Terraform for

F.

Terraform apply

Buy Now
Questions 26

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

Options:

A.

True

B.

False

Buy Now
Questions 27

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
Questions 28

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]

Buy Now
Questions 29

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
Questions 30

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.

Buy Now
Questions 31

Changing the Terraform backend from the default "local" backend to a different one after performing your first terrafom apply is:

Options:

A.

Optional

B.

Impossible

C.

Mandatory

D.

Discouraged

Buy Now
Questions 32

You just upgraded the version of a provider in an existing Terraform project. What do you need to do to install the new provider?

Options:

A.

Run terraform refresh.

B.

Run terraform init -upgrade.

C.

Run terraform apply -upgrade.

D.

Upgrade your version of Terraform.

Buy Now
Questions 33

When you initialize Terraform, where does it cache modules from the public Terraform Registry?

Options:

A.

In the /tmp directory.

B.

In the .terraform sub-directory.

C.

In memory.

D.

They are not cached.

Buy Now
Questions 34

You have used Terraform lo create an ephemeral development environment in the (loud 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 of the resources that mil be deleted? Choose two correct answers.

Options:

A.

Run terraform state rm ‘

B.

Run terraform show :destroy

C.

Run terraform destroy and it will first output all the resource that will be deleted before prompting for approval

D.

Run terraform plan .destory

Buy Now
Questions 35

Terraform providers are always installed from the Internet.

Options:

A.

True

B.

False

Buy Now
Questions 36

When you run terraform apply, the Terraform CLI will print output values from both the root module and any child modules.

Options:

A.

True

B.

False

Buy Now
Questions 37

You want to know from which paths Terraform is loading providers referenced in your Terraform configuration (* files). You need to enable additional logging messages to find this out. Which of the following would achieve this?

Options:

A.

Set verbose for each provider in your Terraform configuration

B.

Set the environment variable TF_LOG_TRACE

C.

Set the environment variable TF_LOG_PATH

D.

Set the environment variable TF_log_TRACE

Buy Now
Questions 38

Which task does terraform init not perform?

Options:

A.

Validates all required variables are present

B.

Sources any modules and copies the configuration locally

C.

Connects to the backend

D.

Sources all providers used in the configuration and downloads them

Buy Now
Questions 39

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

Options:

A.

True

B.

False

Buy Now
Questions 40

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

Options:

A.

True

B.

False

Buy Now
Questions 41

When does Sentinel enforce policy logic during a Terraform Cloud run?

Options:

A.

Before the plan phase

B.

During the plan phase

C.

Before the apply phase

D.

After the apply phase

Buy Now
Questions 42

Which of the following can you do with terraform plan? (Pick 2 correct responses)

Options:

A.

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

B.

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

C.

Save a generated execution plan to apply later.

D.

Execute a plan in a different workspace.

Buy Now
Questions 43

As a developer, you want to ensure your plugins are up to date with the latest versions. Which Terraform command should you use?

Options:

A.

terraform refresh -upgrade

B.

terraform apply -upgrade

C.

terraform init -upgrade

D.

terraform providers -upgrade

Buy Now
Questions 44

Which backend does the Terraform CU use by default?

Options:

A.

Depends on the cloud provider configured

B.

HTTP

C.

Remote

D.

Terraform Cloud

E.

Local

Buy Now
Questions 45

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

Buy Now
Questions 46

A provider configuration block is required in every Terraform configuration.

Example:

Terraform-Associate-003 Question 46

Options:

A.

True

B.

False

Buy Now
Questions 47

Which type of block fetches or computes information for use elsewhere in a Terraform configuration?

Options:

A.

data

B.

local

C.

resource

D.

provider

Buy Now
Questions 48

You add a new provider to your configuration and immediately run terraform apply in the CD using the local backend. Why does the apply fail?

Options:

A.

The Terraform CD needs you to log into Terraform Cloud first

B.

Terraform requires you to manually run terraform plan first

C.

Terraform needs to install the necessary plugins first

D.

Terraform needs you to format your code according to best practices first

Buy Now
Questions 49

How does the Terraform cloud integration differ from other state backends such as S3, Consul,etc?

Options:

A.

It can execute Terraform runs on dedicated infrastructure in Terraform Cloud

B.

It doesn't show the output of a terraform apply locally

C.

It is only arable lo paying customers

D.

All of the above

Buy Now
Questions 50

Terraform variables and outputs that set the description argument will store that description in the state file.

Options:

A.

True

B.

False

Buy Now
Questions 51

A Terraform output that sets the "sensitive" argument to true will not store that value in the state file.

Options:

A.

True

B.

False

Buy Now
Questions 52

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

Buy Now
Questions 53

Which configuration consistency errors does terraform validate report?

Options:

A.

Terraform module isn't the latest version

B.

Differences between local and remote state

C.

Declaring a resource identifier more than once

D.

A mix of spaces and tabs in configuration files

Buy Now
Questions 54

When using a remote backend or terraform Cloud integration, where does Terraform save resource sate?

Options:

A.

In an environment variable

B.

On the disk

C.

In the remote backend or Terraform Cloud

D.

In memory

Buy Now
Questions 55

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

Buy Now
Questions 56

What does this code do?

terraform { required_providers { aws = ">= 3.0" }}

Options:

A.

Requires any version of the AWS provider > = 3.0 and <4.0

B.

Requires any version of the AWS provider >= 3.0

C.

Requires any version of the AWS provider > = 3.0 major release. like 4.1

D.

Requires any version of the AWS provider > 3.0

Buy Now
Questions 57

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

Buy Now
Questions 58

The_________determines how Terraform creates, updates, or delete resources.

Options:

A.

Terraform configuration

B.

Terraform provisioner

C.

Terraform provider

D.

Terraform core

Buy Now
Questions 59

What are some benefits of using Sentinel with Terraform Cloud/Terraform Cloud? Choose three correct answers.

Options:

A.

You can restrict specific resource configurations, such as disallowing the use of CIDR=0.0.0.0/0.

B.

You can check out and check in cloud access keys

C.

Sentinel Policies can be written in HashiCorp Configuration Language (HCL)

D.

Policy-as-code can enforce security best practices

E.

You can enforce a list of approved AWS AMIs

Buy Now
Questions 60

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

Options:

A.

True

B.

False

Buy Now
Questions 61

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

Buy Now
Questions 62

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

Buy Now
Questions 63

Which of these is true about Terraform's plugin-based architecture?

Options:

A.

Terraform can only source providers from the internet

B.

Every provider in a configuration has its own state file for its resources

C.

You can create a provider for your API if none exists

D.

All providers are part of the Terraform core binary

Buy Now
Questions 64

What is the Terraform style convention for indenting a nesting level compared to the one above it?

Options:

A.

With two spaces.

B.

With four spaces.

C.

With three spaces.

D.

With a tab.

Buy Now
Questions 65

Which command lets you experiment with terraform expressions?

Options:

A.

Terraform console

B.

Terraform validate

C.

Terraform env

D.

Terraform test

Buy Now
Questions 66

What functionality do providers offer in Terraform?(Pick 3 correct responses)

Options:

A.

Interact with cloud provider APIs.

B.

Provision resources for on-premises infrastructure services.

C.

Group a collection of Terraform configuration files that map to a single state file.

D.

Provision resources for public cloud infrastructure services.

E.

Enforce security and compliance policies.

Buy Now
Questions 67

Which is the best way to specify a tag of v1.0.0 when referencing a module stored in Git (for example.

Git::https://example.com/vpc.git)?

Options:

A.

Append pref=v1.0.0 argument to the source path

B.

Add version = “1.0.0” parameter to module block

C.

Nothing modules stored on GitHub always default to version 1.0.0

Buy Now
Questions 68

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

Options:

A.

True

B.

False

Buy Now
Questions 69

Why does this backend configuration not follow best practices?

Terraform-Associate-003 Question 69

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

Buy Now
Questions 70

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

Buy Now
Questions 71

While attempting to deploy resources into your cloud provider using Terraform, you begin to see some odd behavior and experience slow responses. In order to troubleshoot you decide to turn on Terraform debugging. Which environment variables must be configured to make Terraform's logging more verbose?

Options:

A.

TF_LOG_PAIH

B.

TF_LOG

C.

TF_VAR_log_path

D.

TF_VAR_log_level

Buy Now
Exam Name: HashiCorp Certified: Terraform Associate (003) (HCTA0-003)
Last Update: Sep 11, 2025
Questions: 237

PDF + Testing Engine

$134.99

Testing Engine

$99.99

PDF (Q&A)

$84.99