Winter Special Sale - Limited Time 60% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: 575363r9

Welcome To DumpsPedia

Terraform-Associate-003 Sample Questions Answers

Questions 4

Which of the following statements about Terraform modules is not true?

Options:

A.

Modules can call other modules

B.

A module is a container for one or more resources

C.

Modules must be publicly accessible

D.

You can call the same module multiple times

Buy Now
Questions 5

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

Options:

A.

Provider

B.

Resource ID

C.

Resource address

D.

Path

Buy Now
Questions 6

What value does the Terraform Cloud private registry provide over the public Terraform Module Registry?

Options:

A.

The ability to share modules publicly with any user of Terraform

B.

The ability to restrict modules to members of Terraform Cloud or Enterprise organizations

C.

The ability to tag modules by version or release

D.

The ability to share modules with public Terraform users and members of Terraform Cloud Organizations

Buy Now
Questions 7

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 8

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

Options:

A.

You can enforce a list of approved AWS AMIs

B.

Policy-as-code can enforce security best practices

C.

You can check out and check in cloud access keys

D.

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

E.

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

Buy Now
Questions 9

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 10

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 11

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 12

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

Options:

A.

True

B.

False

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

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 15

If a module declares a variable with a default, that variable must also be defined within the module.

Options:

A.

True

B.

False

Buy Now
Questions 16

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 17

Terraform variable names are saved in the state file.

Options:

A.

True

B.

False

Buy Now
Questions 18

You want to define multiple data disks as nested blocks inside the resource block for a virtual machine. What Terraform feature would help you define the blocks using the values in a variable?

Options:

A.

Local values

B.

Count arguments

C.

Collection functions

D.

Dynamic blocks

Buy Now
Questions 19

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 20

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 21

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 22

Which of the following should you put into the required_providers block?

Options:

A.

version >= 3.1

B.

version = “>= 3.1”

C.

version ~> 3.1

Buy Now
Questions 23

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 24

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 25

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 26

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 27

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 28

Only the user that generated a plan may apply it.

Options:

A.

True

B.

False

Buy Now
Questions 29

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

Options:

A.

True

B.

False

Buy Now
Questions 30

_______backends support state locking.

Options:

A.

All

B.

No

C.

Some

D.

Only local

Buy Now
Questions 31

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 32

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 33

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 34

What is the provider for this resource?

Options:

A.

Vpc

B.

Test

C.

Main

D.

aws

Buy Now
Questions 35

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 36

The public Terraform Module Registry is free to use.

Options:

A.

True

B.

False

Buy Now
Questions 37

Which of these are features of HCP Terraform/Terraform Cloud? Pick the 2 correct responses below.

Options:

A.

Automated infrastructure deployment visualization.

B.

A web-based user interface (UI).

C.

Automatic backups of configuration and state.

D.

Remote state storage.

Buy Now
Questions 38

What is one disadvantage of using dynamic blocks in Terraform?

Options:

A.

Dynamic blocks can construct repeatable nested blocks

B.

Terraform will run more slowly

C.

They cannot be used to loop through a list of values

D.

They make configuration harder to read and understand

Buy Now
Questions 39

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 40

A developer accidentally launched a VM (virtual machine) outside of the Terraform workflow and ended up with two servers with the same name. They don't know which VM Terraform manages but do have a list of all active VM IDs.

Which of the following methods could you use to discover which instance Terraform manages?

Options:

A.

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

B.

Update the code to include outputs for the ID of all VMs, then run terraform plan to view the outputs

C.

Run terraform taint/code on all the VMs to recreate them

D.

Use terraform refresh/code to find out which IDs are already part of state

Buy Now
Questions 41

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 42

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 43

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 44

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 45

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

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 46

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 47

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 48

A terraform apply can not _________ infrastructure.

Options:

A.

change

B.

destroy

C.

provision

D.

import

Buy Now
Questions 49

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

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 50

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

Options:

A.

True

B.

False

Buy Now
Questions 51

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 52

What feature stops multiple users from operating on the Terraform state at the same time?

Options:

A.

State locking

B.

Version control

C.

Provider constraints

D.

Remote backends

Buy Now
Questions 53

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 54

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

Options:

A.

True

B.

False

Buy Now
Questions 55

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 56

Which of these actions will prevent two Terraform runs from changing the same state file at the same time?

Options:

A.

Refresh the state after running Terraform

B.

Delete the state before running Terraform

C.

Configure state locking for your state backend

D.

Run Terraform with parallelism set to 1

Buy Now
Questions 57

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 58

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
Exam Code: Terraform-Associate-003
Exam Name: HashiCorp Certified: Terraform Associate (003) (HCTA0-003)
Last Update: Nov 16, 2024
Questions: 195
$64  $159.99
$48  $119.99
$40  $99.99
buy now Terraform-Associate-003