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

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

Options:

A.

True

B.

False

Buy Now
Questions 5

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 6

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?

A)

Terraform-Associate-003 Question 6

B)

Terraform-Associate-003 Question 6

C)

Terraform-Associate-003 Question 6

D)

Terraform-Associate-003 Question 6

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 7

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

Buy Now
Questions 8

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 9

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 10

terraform validate reports syntax check errors for which of the following?

Options:

A.

Code contains tabs for indentation instead of spaces

B.

There is a missing value for a variable

C.

The state file does not match the current infrastructure

D.

None of the above

Buy Now
Questions 11

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 12

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 13

A provider configuration block is required in every Terraform configuration.

Example:

Terraform-Associate-003 Question 13

Options:

A.

True

B.

False

Buy Now
Questions 14

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 15

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

Options:

A.

True

B.

False

Buy Now
Questions 16

In Terraform HCL, an object type of object({name=string, age-number}) would match this value.

A)

Terraform-Associate-003 Question 16

B)

Terraform-Associate-003 Question 16

C)

Terraform-Associate-003 Question 16

D)

Terraform-Associate-003 Question 16

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 17

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.

Buy Now
Questions 18

Terraform providers are always installed from the Internet.

Options:

A.

True

B.

False

Buy Now
Questions 19

Terraform configuration can only import modules from the public registry.

Options:

A.

True

B.

False

Buy Now
Questions 20

Which command must you first run before performing further Terraform operations in a working directory?

Options:

A.

terraform import

B.

terraform workspace

C.

terraform plan

D.

terraform init

Buy Now
Questions 21

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 22

Which of these commands makes your code more human readable?

Options:

A.

Terraform validate

B.

Terraform output

C.

Terraform show

D.

Terraform fmt

Buy Now
Questions 23

What is the name of the default file where Terraform stores the state?

Type your answer in the field provided. The text field is not case-sensitive and all variations of the correct answer are accepted.

Options:

Buy Now
Questions 24

You have a list of numbers that represents the number of free CPU cores on each virtual cluster:

Terraform-Associate-003 Question 24

What Terraform function could you use to select the largest number from the list?

Options:

A.

top(numcpus)

B.

max(numcpus)

C.

ceil (numcpus)

D.

hight[numcpus]

Buy Now
Questions 25

How would you reference the "name’’ value of the second instance of this resource?

Terraform-Associate-003 Question 25

Options:

A.

aws_instance.web(2),name

B.

element(aws_instance.web, 2)

C.

aws_instance-web(1)

D.

aws_instance_web(1),name

E.

Aws_instance,web,* , name

Buy Now
Questions 26

When you include a module block in your configuration that references a module from the Terraform Registry, the "version" attribute is required.

Options:

A.

True

B.

False

Buy Now
Questions 27

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 28

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

Options:

A.

Cloud infrastructure Most Voted

B.

The .terraform directory

C.

The execution plan

D.

State file

E.

Terraform code

Buy Now
Questions 29

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 30

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

Options:

A.

With a tab

B.

With two spaces

C.

With four spaces

D.

With three spaces

Buy Now
Questions 31

Terraform encrypts sensitive values stored in your state file.

Options:

A.

True

B.

False

Buy Now
Questions 32

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 33

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

What does Terraform use the .terraform.lock.hc1 file for?

Options:

A.

There is no such file

B.

Tracking specific provider dependencies

C.

Preventing Terraform runs from occurring

D.

Storing references to workspaces which are locked

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

Which of these are benefits of using Sentinel with HCP Terraform/Terraform Cloud? (Pick the 3 correct responses)

Options:

A.

You can enforce a list of approved AWS AMIs.

B.

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

C.

You can check out and check in cloud access keys.

D.

Policy-as-code can enforce security best practices.

Buy Now
Questions 37

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 38

You have provisioned some virtual machines (VMs) on Google Cloud Platform (GCP) using the gcloud command line tool. However, you are standardizing with Terraform and want to manage these VMs using Terraform instead. What are the two things you must do to achieve this? Choose two correct answers.

Options:

A.

Run the terraform Import-gcp command

B.

Write Terraform configuration for the existing VMs

C.

Use the terraform import command for the existing VMs

D.

Provision new VMs using Terraform with the same VM names

Buy Now
Questions 39

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 40

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

Buy Now
Questions 41

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 42

Why does this backend configuration not follow best practices?

Terraform-Associate-003 Question 42

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 43

What does the default "local" Terraform backend store?

Options:

A.

tfplan files

B.

State file

C.

Provider plugins

D.

Terraform binary

Buy Now
Questions 44

What does state looking accomplish?

Options:

A.

Prevent accidental Prevent accident deletion of the state file

B.

Blocks Terraform commands from modifying, the state file

C.

Copies the state file from memory to disk

D.

Encrypts any credentials stored within the state file

Buy Now
Questions 45

Which of the following module source paths does not specify a remote module?

Options:

A.

Source = “module/consul’’

B.

Source = ‘’githhub.comicrop/example’’

C.

Source =’’git@github.com:hasicrop/example.git’’

D.

Source = ‘’hasicrop/consul/aws’’

Buy Now
Questions 46

If you manually destroy infrastructure, what is the best practice reflecting this change in Terraform?

Options:

A.

Run terraform refresh

B.

It will happen automatically

C.

Manually update the state fire

D.

Run terraform import

Buy Now
Questions 47

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 48

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 49

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 50

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

Options:

A.

True

B.

False

Buy Now
Questions 51

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

Options:

A.

True

B.

False

Buy Now
Questions 52

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

Options:

A.

True

B.

False

Buy Now
Questions 53

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 54

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 55

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 56

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 57

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 58

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

Buy Now
Exam Name: HashiCorp Certified: Terraform Associate (003) (HCTA0-003)
Last Update: Nov 24, 2024
Questions: 195

PDF + Testing Engine

$57.75  $164.99

Testing Engine

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

PDF (Q&A)

$36.75  $104.99
buy now Terraform-Associate-003 pdf