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

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

Questions 4

You much initialize your working directory before running terraform validate.

Options:

A.

True

B.

False

Buy Now
Questions 5

You want to use API tokens and other secrets within your team's Terraform workspaces. Where does HashiCorp recommend you store these sensitive values? (Pick the 3 correct responses)

Options:

A.

In an HCP Terraform/Terraform Cloud variable, with the sensitive option checked.

B.

In HashiCorp Vault.

C.

In a terraform.tfvars file, securely managed and shared with your team.

D.

In a terraform.tfvars file, checked into your version control system.

E.

In a plaintext document on a shared drive.

Buy Now
Questions 6

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

Options:

A.

resource.kubernetes_namespace.example.name

B.

kubernetes_namespace.example.name

C.

data.kubernetes.namespace.name

D.

kubernetes_namespace.test.name

Buy Now
Questions 7

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

Options:

A.

True

B.

False

Buy Now
Questions 8

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 9

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

Your DevOps team is currently using the local backend for your Terraform configuration. You would like to move to a remote backend to store the state file in a central location. Which of the following backends would not work?

Options:

A.

Artifactory

B.

Amazon S3

C.

Terraform Cloud

D.

Git

Buy Now
Questions 11

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 12

How could you reference an attribute from the vsphere_datacenter data source for use with the datacenter_id argument within the vsphere_folder resource in the following configuration?

Options:

A.

Data.vsphere_datacenter.DC.id

B.

Vsphere_datacenter.dc.id

C.

Data,dc,id

D.

Data.vsphere_datacenter,dc

Buy Now
Questions 13

Which of these commands makes your code more human readable?

Options:

A.

Terraform validate

B.

Terraform output

C.

Terraform show

D.

Terraform file

Buy Now
Questions 14

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 15

Options:

A.

Modify the Terraform configuration to add an import block for both of the virtual machines.

B.

Run a terraform apply -refresh to identify the virtual machine IDs that are already managed by Terraform.

C.

Run terraform state rm on both VMs, then terraform apply to recreate the correct one.

D.

Run terraform state list to find the names of all VMs, then run terraform state show for each of them to find which VM ID Terraform manages.

Buy Now
Questions 16

Terraform providers are part of the Terraform core binary.

Options:

A.

True

B.

False

Buy Now
Questions 17

You can configure Terraform to log to a file using the TF_LOG environment variable.

Options:

A.

True

B.

False

Buy Now
Questions 18

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

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

Options:

A.

True

B.

False

Buy Now
Questions 20

Which provider authentication method prevents credentials from being stored in the state file?

Options:

A.

Using environment variables

B.

Specifying the login credentials in the provider block

C.

Setting credentials as Terraform variables

D.

None of the above

Buy Now
Questions 21

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 22

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 23

A module can always refer to all variables declared in its parent module.

Options:

A.

True

B.

False

Buy Now
Questions 24

You have declared a variable called var.list which is a list of objects that all have an attribute id . Which options will produce a list of the IDs? Choose two correct answers.

Options:

A.

[ var.list [ * ] , id ]

B.

[ for o in var.list : o.Id ]

C.

var.list[*].id

D.

{ for o in var.llst : o => o.id }

Buy Now
Questions 25

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 26

You add a new resource to an existing Terraform configuration, but do not update the version constraint in the configuration. The existing and new resources use the same provider. The working contains a .terraform.lock, hc1 file.

How will Terraform choose which version of the provider to use?

Options:

A.

Terraform will use the version recorded in your lock file

B.

Terraform will use the latest version of the provider for the new resource and the version recorded in the lock file to manage existing resources

C.

Terraform will check your state file to determine the provider version to use

D.

Terraform will use the latest version of the provider available at the time you provision your new resource

Buy Now
Questions 27

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

Options:

A.

True

B.

False

Buy Now
Questions 28

Which of the following locations can Terraform use as aprivate sourcefor modules?(Pick 2 correct responses)

Options:

A.

Public repository on GitHub.

B.

Public Terraform Registry.

C.

Internally hosted VCS (Version Control System) platform.

D.

Private repository on GitHub.

Buy Now
Questions 29

Where in your Terraform configuration do you specify a state backend?

Options:

A.

The resource block

B.

The data source block

C.

The terraform block

D.

The provider block

Buy Now
Questions 30

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 31

Why does this backend configuration not follow best practices?

Terraform-Associate-003 Question 31

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 32

Options:

A.

fileset("id_rsa.pub")

B.

file("id_rsa.pub")

C.

filebase64("id_rsa.pub")

D.

templatefile("id_rsa.pub")

Buy Now
Questions 33

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 34

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 34

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 35

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 36

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 37

How can terraform plan aid in the development process?

Options:

A.

Initializes your working directory containing your Terraform configuration files

B.

Validates your expectations against the execution plan without permanently modifying state

C.

Formats your Terraform configuration files

D.

Reconciles Terraform's state against deployed resources and permanently modifies state using the current status of deployed resources

Buy Now
Questions 38

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

Buy Now
Questions 39

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 40

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 41

Options:

A.

Run all Terraform commands on a shared server or container.

B.

Configure the authentication credentials in your Terraform configuration files, and store them in version control.

C.

Use environment variables to configure authentication credentials outside of your Terraform configuration.

D.

None of the above.

Buy Now
Questions 42

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

Buy Now
Questions 43

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 44

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 45

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 46

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 47

What does the default "local" Terraform backend store?

Options:

A.

tfplan files

B.

State file

C.

Provider plugins

D.

Terraform binary

Buy Now
Questions 48

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.

Buy Now
Questions 49

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 50

Terraform can only manage resource dependencies if you set them explicitly with the depends_on argument.

Options:

A.

True

B.

False

Buy Now
Questions 51

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 52

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 53

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

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

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

Buy Now
Questions 57

Options:

A.

In a plaintext document on a shared drive.

B.

In a terraform.tfvars file, checked into version control.

C.

In a terraform.tfvars file, securely managed and shared with your team.

D.

In an HCP Terraform/Terraform Cloud variable, with the sensitive option checked.

E.

In HashiCorp Vault.

Buy Now
Questions 58

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

Options:

A.

True

B.

False

Buy Now
Questions 59

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

Options:

A.

True

B.

False

Buy Now
Questions 60

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 61

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 62

terraform destroy is the only way to remove infrastructure.

Options:

A.

True

B.

False

Buy Now
Questions 63

When does Terraform create the .terraform.lock.hc1 file?

Options:

A.

After your first terraform plan

B.

After your first terraform apply

C.

After your first terraform init

D.

When you enable state locking

Buy Now
Questions 64

The public Terraform Module Registry is free to use.

Options:

A.

True

B.

False

Buy Now
Questions 65

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 66

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

Buy Now
Questions 67

A provider configuration block is required in every Terraform configuration.

Example:

Terraform-Associate-003 Question 67

Options:

A.

True

B.

False

Buy Now
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.

Buy Now
Questions 69

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 70

terraform plan updates your state file.

Options:

A.

True

B.

False

Buy Now
Questions 71

terraform init creates an example main.tf file in the current directory.

Options:

A.

True

B.

False

Buy Now
Questions 72

Once you configure a new Terraform backend with a terraform code block, which command(s) should you use to migrate the state file?

Options:

A.

terraform destroy, then terraform apply

B.

terraform init

C.

terraform push

D.

terraform apply

Buy Now
Questions 73

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

Buy Now
Questions 74

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

Options:

A.

Provider

B.

Resource ID

C.

Resource address

D.

Path

Buy Now
Exam Name: HashiCorp Certified: Terraform Associate (003) (HCTA0-003)
Last Update: Oct 3, 2025
Questions: 248

PDF + Testing Engine

$49.5  $164.99

Testing Engine

$37.5  $124.99
buy now Terraform-Associate-003 testing engine

PDF (Q&A)

$31.5  $104.99
buy now Terraform-Associate-003 pdf
dumpsmate guaranteed to pass
24/7 Customer Support

DumpsMate's team of experts is always available to respond your queries on exam preparation. Get professional answers on any topic of the certification syllabus. Our experts will thoroughly satisfy you.

Site Secure

mcafee secure

TESTED 03 Oct 2025