Weekend Sale Limited Time 60% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 713PS592

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

Questions 4

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 5

Which command lets you experiment with terraform expressions?

Options:

A.

Terraform console

B.

Terraform validate

C.

Terraform env

D.

Terraform test

Buy Now
Questions 6

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 7

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 8

How would you output returned values from a child module in the Terraform CLI output?

Options:

A.

Declare the output in the root configuration

B.

Declare the output in the child module

C.

Declare the output in both the root and child module

D.

None of the above

Buy Now
Questions 9

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

Terraform-Associate-003 Question 9

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

Buy Now
Questions 10

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

Options:

A.

True

B.

False

Buy Now
Questions 11

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

Options:

A.

True

B.

False

Buy Now
Questions 12

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

Options:

A.

Provider

B.

Resource ID

C.

Resource address

D.

Path

Buy Now
Questions 13

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

Options:

A.

True

B.

False

Buy Now
Questions 14

terraform plan updates your state file.

Options:

A.

True

B.

False

Buy Now
Questions 15

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

Options:

A.

True

B.

False

Buy Now
Questions 16

You are using a networking module in your Terraform configuration with the name label my-network. In your main configuration you have the following code:

Terraform-Associate-003 Question 16

When you run terraform validate, you get the following error:

Terraform-Associate-003 Question 16

What must you do to successfully retrieve this value from your networking module?

Options:

A.

Change the reference value to my-network,outputs,vmet_id

B.

Define the attribute vmet_id as a variable in the networking modeule

C.

Define the attribute vnet_id as an output in the networking module

D.

Change the reference value module.my,network,outputs,vnet_id

Buy Now
Questions 17

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 18

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 19

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

Options:

A.

True

B.

False

Buy Now
Questions 20

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 20

B)

Terraform-Associate-003 Question 20

C)

Terraform-Associate-003 Question 20

D)

Terraform-Associate-003 Question 20

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 21

You much initialize your working directory before running terraform validate.

Options:

A.

True

B.

False

Buy Now
Questions 22

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

Options:

A.

True

B.

False

Buy Now
Questions 23

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 24

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 25

The public Terraform Module Registry is free to use.

Options:

A.

True

B.

False

Buy Now
Questions 26

Why does this backend configuration not follow best practices?

Terraform-Associate-003 Question 26

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 27

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 28

A terraform apply can not _________ infrastructure.

Options:

A.

change

B.

destroy

C.

provision

D.

import

Buy Now
Questions 29

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 30

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

Options:

A.

True

B.

False

Buy Now
Questions 31

How does Terraform manage most dependencies between resources?

Options:

A.

Terraform will automatically manage most resource dependencies

B.

Using the depends_on parameter

C.

By defining dependencies as modules and including them in a particular order

D.

The order that resources appear in Terraform configuration indicates dependencies

Buy Now
Questions 32

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 32

B)

Terraform-Associate-003 Question 32

C)

Terraform-Associate-003 Question 32

D)

Terraform-Associate-003 Question 32

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 33

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

Options:

A.

True

B.

False

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

What is the workflow for deploying new infrastructure with Terraform?

Options:

A.

Write Terraform configuration, run terraform init to initialize the working directory or

workspace, and run terraform apply

B.

Write Terraform configuration, run terraform show to view proposed changes, and terraform apply to create new infrastructure

C.

Write Terraform configuration, run terraform apply to create infrastructure, use terraform validate to confirm Terraform deployed resources correctly

D.

Write Terraform configuration, run terraform plan to initialize the working directory or workspace, and terraform apply to create the infrastructure

Buy Now
Questions 36

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 37

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 38

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 39

How does Terraform determine dependencies between resources?

Options:

A.

Terraform requires resource dependencies to be defined as modules and sourced in order

B.

Terraform automatically builds a resource graph based on resources provisioners, special meta-parameters, and the stale file (if present}

C.

Terraform requires resources in a configuration to be listed m the order they will be created to determine dependencies

D.

Terraform requires all dependencies between resources to be specified using the depends_on parameter

Buy Now
Questions 40

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

A)

Terraform-Associate-003 Question 40

B)

Terraform-Associate-003 Question 40

C)

Terraform-Associate-003 Question 40

D)

Terraform-Associate-003 Question 40

Options:

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Buy Now
Questions 41

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 42

How is terraform import run?

Options:

A.

As a part of terraform init

B.

As a part of terraform plan

C.

As a part of terraform refresh

D.

By an explicit call

E.

All of the above

Buy Now
Questions 43

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

Options:

A.

True

B.

False

Buy Now
Questions 44

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 45

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

Options:

A.

True

B.

False

Buy Now
Questions 46

Terraform configuration can only import modules from the public registry.

Options:

A.

True

B.

False

Buy Now
Questions 47

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 48

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
Exam Name: HashiCorp Certified: Terraform Associate (003)
Last Update: May 10, 2024
Questions: 161

PDF + Testing Engine

$66.4  $165.99

Testing Engine

$46  $114.99
buy now Terraform-Associate-003 testing engine

PDF (Q&A)

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