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

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

Questions 4

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

Buy Now
Questions 5

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

Options:

A.

True

B.

False

Buy Now
Questions 6

Using the terraform state rm command against a resource will destroy it.

Options:

A.

True

B.

False

Buy Now
Questions 7

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

Which method for sharing Terraform modules fulfills the following criteria:

Keeps the module configurations confidential within your organization.

Supports Terraform's semantic version constraints.

Provides a browsable directory of your modules.

Options:

A.

A Git repository containing your modules.

B.

Public Terraform module registry.

C.

A subfolder within your workspace.

D.

HCP Terraform/Terraform Cloud private registry.

Buy Now
Questions 9

You cannot install third party plugins using terraform init.

Options:

A.

True

B.

False

Buy Now
Questions 10

When should you write Terraform configuration files for existing infrastructure that you want to start managing with Terraform?

Options:

A.

You can import infrastructure without corresponding Terraform code

B.

Terraform will generate the corresponding configuration files for you

C.

Before you run terraform Import

D.

After you run terraform import

Buy Now
Questions 11

Where can Terraform not load a provider from?

Options:

A.

Plugins directory

B.

Provider plugin chance

C.

Official HashCrop Distribution on releases.hashcrop.com

D.

Source code

Buy Now
Questions 12

Which of the following is availableonlyinHCP Terraform workspacesandnot in Terraform CLI?

Options:

A.

Dry runs with terraform plan.

B.

Secure variable storage.

C.

Using one workspace's state as a data source for another.

D.

Support for multiple cloud providers.

Buy Now
Questions 13

What kind of configuration block will create an infrastructure object with settings specified within the block?

Options:

A.

provider

B.

state

C.

data

D.

resource

Buy Now
Questions 14

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

Options:

A.

True

B.

False

Buy Now
Questions 15

If one of your modules uses a local value, you can expose that value to callers of the module by defining a Terraform output in the module’s configuration.

Options:

A.

True

B.

False

Buy Now
Questions 16

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

Buy Now
Questions 17

A child module can always access variables declared in its parent module.

Options:

A.

True

B.

False

Buy Now
Questions 18

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

Buy Now
Questions 19

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 20

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 21

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 22

Running terraform fmt without any flags in a directory with Terraform configuration files check the formatting of those files without changing their contents.

Options:

A.

True

B.

False

Buy Now
Questions 23

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

Options:

A.

True

B.

False

Buy Now
Questions 24

You have to initialize a Terraform backend before it can be configured.

Options:

A.

True

B.

False

Buy Now
Questions 25

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 26

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.

Buy Now
Questions 27

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

Options:

A.

True

B.

False

Buy Now
Questions 28

What is the provider for the resource shown in the Exhibit?

resource "aws_vpc" "main" {

name = "test"

}

Options:

A.

VPC

B.

test

C.

main

D.

aws

Buy Now
Questions 29

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 30

What information does the public Terraform Module Registry automatically expose about published modules?

Options:

A.

Required input variables

B.

Optional inputs variables and default values

C.

Outputs

D.

All of the above

E.

None of the above

Buy Now
Questions 31

Only the user that generated a plan may apply it.

Options:

A.

True

B.

False

Buy Now
Questions 32

Parent modules can always access a child module's variable values.

Options:

A.

True

B.

False

Buy Now
Questions 33

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 34

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

Buy Now
Questions 35

When using multiple configuration of the same Terraform provider, what meta-argument must you include in any non-default provider configurations?

Options:

A.

Alias

B.

Id

C.

Depends_on

D.

name

Buy Now
Questions 36

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

Buy Now
Questions 37

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

Buy Now
Questions 38

HashiCorp Configuration Language (HCL) supports user-denned functions.

Options:

A.

True

B.

False

Buy Now
Questions 39

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

Which argument can you use toprevent unexpected updatesto a module's configuration when calling Terraform Registry modules?

Options:

A.

source

B.

count

C.

version

D.

lifecycle

Buy Now
Questions 41

You have created a main.tf Terraform configuration consisting of an application server, a database and a load balanced. You ran terraform apply and Terraform created all of the resources successfully.

Now you realize that you do not actually need the load balancer, so you run terraform destroy without any flags. What will happen?

Options:

A.

Terraform will prompt you to pick which resource you want to destroy

B.

Terraform will destroy the application server because it is listed first in the code

C.

Terraform will prompt you to confirm that you want to destroy all the infrastructure

D.

Terraform will destroy the main, tf file

E.

Terraform will immediately destroy all the infrastructure

Buy Now
Questions 42

Only the user that generated a terraform plan may apply it.

Options:

A.

True

B.

False

Buy Now
Questions 43

Terraform installs its providers during which phase?

Options:

A.

Plan

B.

Init

C.

Refresh

D.

All of the above

Buy Now
Questions 44

You're writing a Terraform configuration that needs to read input from a local file called id_rsa.pub . Which built-in Terraform function can you use to import the file's contents as a string?

Options:

A.

file("id_rsa.pub")

B.

templaTefil("id_rsa.pub")

C.

filebase64("id_rsa.pub")

D.

fileset<"id_rsa.pub")

Buy Now
Questions 45

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 46

Terraform configuration can only call modules from the public registry.

Options:

A.

True

B.

False

Buy Now
Questions 47

Which Terraform command checks that your configuration syntax is correct?

Options:

A.

terraform validate

B.

terraform init

C.

terraform show

D.

terraform fmt

Buy Now
Questions 48

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

Options:

A.

True

B.

False

Buy Now
Questions 49

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 50

Terraform providers are always installed from the Internet.

Options:

A.

True

B.

False

Buy Now
Questions 51

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 52

You use a cloud provider account that is shared with other team members. You previously used Terraform to create a load balancer that listens on port 80. After application changes, you updated the Terraform code to change the port to 443.

You run terraform plan and see that the execution plan shows the port changing from 80 to 443 like you intended and step away to grab some coffee.

In the meantime, another team member manually changes the load balancer port to 443 through the cloud provider console before you get back to your desk.

What will happen when you run terraform apply upon returning to your desk?

Options:

A.

Terraform will recreate the load balancer.

B.

Terraform will fail with an error because the state file is no longer accurate.

C.

Terraform will change the load balancer port to 80, and then change it back to 443.

D.

Terraform will not make any changes to the load balancer and will update the state file to reflect the manual change.

Buy Now
Questions 53

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 54

The Terraform binary version and provider versions must match each other in a single configuration.

Options:

A.

True

B.

False

Buy Now
Questions 55

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 56

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.

Terraform-Associate-003 Question 56

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

Buy Now
Questions 57

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

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

Options:

A.

True

B.

False

Buy Now
Questions 59

By default, if you do not define a backend for your configuration, where does Terraform store information about the resources that it manages?

Options:

A.

A subdirectory of your home directory named .terraform.d

B.

A file in your configuration's directory named terraform.tfstate

C.

A file in your configuration's directory named .terraform.lock.hcl

D.

A subdirectory of your configuration named .terraform

Buy Now
Questions 60

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.

Buy Now
Questions 61

You have a simple Terraform configuration containing one virtual machine (VM) in a cloud provider. You run terraform apply and the VM is created successfully. What will happen if you terraform apply again immediately afterward without changing any Terraform code?

Options:

A.

Terraform will terminate and recreate the VM.

B.

Terraform will create another duplicate VM.

C.

Terraform will apply the VM to the state file.

D.

Nothing

Buy Now
Questions 62

You have never used Terraform before and would like to test it out using a shared team account for a cloud provider. The shared team account already contains 15 virtual machines (VM). You develop a Terraform configuration containing one VM. perform terraform apply, and see that your VM was created successfully. What should you do to delete the newly-created VM with Terraform?

Options:

A.

The Terraform state file contains all 16 VMs in the team account. Execute terraform destroy and select the newly-created VM.

B.

Delete the Terraform state file and execute terraform apply.

C.

The Terraform state file only contains the one new VM. Execute terraform destroy.

D.

Delete the VM using the cloud provider console and terraform apply to apply the changes to the Terraform state file.

Buy Now
Questions 63

Your security team scanned some Terraform workspaces and found secrets stored in plaintext in state files. How can you protect that data?

Options:

A.

Edit your state file to scrub out the sensitive data

B.

Always store your secrets in a secrets.tfvars file

C.

Delete the state file every time you run Terraform

D.

Store the state in an encrypted backend

Buy Now
Questions 64

terraform destroy is the only way to remove infrastructure.

Options:

A.

True

B.

False

Buy Now
Questions 65

Terraform providers are part of the Terraform core binary.

Options:

A.

True

B.

False

Buy Now
Questions 66

Which of these ate secure options for storing secrets for connecting to a Terraform remote backend? Choose two correct answers.

Options:

A.

A variable file

B.

Defined in Environment variables

C.

Inside the backend block within the Terraform configuration

D.

Defined in a connection configuration outside of Terraform

Buy Now
Questions 67

Terraform encrypts sensitive values stored in your state file.

Options:

A.

True

B.

False

Buy Now
Questions 68

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 69

You must use different Terraform commands depending on the cloud provider you use.

Options:

A.

True

B.

False

Buy Now
Questions 70

A provider configuration block is required in every Terraform configuration.

Example:

Terraform-Associate-003 Question 70

Options:

A.

True

B.

False

Buy Now
Questions 71

How can you trigger a run in a Terraform Cloud workspace that is connected to a Version Control System (VCS) repository?

Options:

A.

Only Terraform Cloud organization owners can set workspace variables on VCS connected workspaces

B.

Commit a change to the VCS working directory and branch that the Terraform Cloud workspace is connected to

C.

Only Terraform Cloud organization owners can approve plans in VCS connected workspaces

D.

Only members of a VCS organization can open a pull request against repositories that are connected to Terraform Cloud workspaces

Buy Now
Questions 72

You can reference a resource created with for_each using a Splat ( *) expression.

Options:

A.

True

B.

False

Buy Now
Questions 73

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 74

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
Exam Name: HashiCorp Certified: Terraform Associate (003) (HCTA0-003)
Last Update: Dec 30, 2025
Questions: 253

PDF + Testing Engine

$63.52  $181.49

Testing Engine

$50.57  $144.49
buy now Terraform-Associate-003 testing engine

PDF (Q&A)

$43.57  $124.49
buy now Terraform-Associate-003 pdf