Labour Day Special 65% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: exams65

HashiCorp Certified: Terraform Associate (003) Question and Answers

HashiCorp Certified: Terraform Associate (003)

Last Update May 5, 2024
Total Questions : 161

We are offering FREE Terraform-Associate-003 HashiCorp exam questions. All you do is to just go and sign up. Give your details, prepare Terraform-Associate-003 free exam questions and then go for complete pool of HashiCorp Certified: Terraform Associate (003) test questions that will help you more.

Terraform-Associate-003 pdf

Terraform-Associate-003 PDF

$35  $99.99
Terraform-Associate-003 Engine

Terraform-Associate-003 Testing Engine

$42  $119.99
Terraform-Associate-003 PDF + Engine

Terraform-Associate-003 PDF + Testing Engine

$56  $159.99
Questions 1

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

Options:

A.  

True

B.  

False

Discussion 0
Questions 2

You much initialize your working directory before running terraform validate.

Options:

A.  

True

B.  

False

Discussion 0
Questions 3

Outside of the required_providers block, Terraform configurations always refer to providers by their local names.

Options:

A.  

True

B.  

False

Discussion 0
Questions 4

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

Discussion 0
Questions 5

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

Options:

A.  

True

B.  

False

Discussion 0
Questions 6

Which of these statements about Terraform Cloud workspaces is false?

Options:

A.  

They have role-based access controls

B.  

You must use the CLI to switch between workspaces

C.  

Plans and applies can be triggered via version control system integrations

D.  

They can securely store cloud credentials

Discussion 0
Questions 7

Terraform variable names are saved in the state file.

Options:

A.  

True

B.  

False

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

Discussion 0
Questions 9

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

Discussion 0
Questions 10

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

Discussion 0
Questions 11

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

Discussion 0
Questions 12

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

Discussion 0
Questions 13

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

Options:

A.  

True

B.  

False

Discussion 0
Questions 14

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

Discussion 0
Questions 15

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)

B)

C)

D)

Options:

A.  

Option A

B.  

Option B

C.  

Option C

D.  

Option D

Discussion 0
Questions 16

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

Options:

A.  

True

B.  

False

Discussion 0
Questions 17

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

Discussion 0
Questions 18

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

Discussion 0
Questions 19

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

Discussion 0
Questions 20

Terraform configuration can only import modules from the public registry.

Options:

A.  

True

B.  

False

Discussion 0
Questions 21

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

Discussion 0
Questions 22

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

Discussion 0
Questions 23

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

Discussion 0
Questions 24

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

Discussion 0
Questions 25

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

Discussion 0
Questions 26

How do you specify a module’s version when publishing it to the public terraform Module Registry?

Options:

A.  

Configuration it in the module's Terraform code

B.  

Mention it on the module's configuration page on the Terraform Module Registry

C.  

The Terraform Module Registry does not support versioning modules

D.  

Tag a release in the associated repo

Discussion 0
Questions 27

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

Options:

A.  

True

B.  

False

Discussion 0
Questions 28

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

Options:

A.  

True

B.  

False

Discussion 0
Questions 29

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

Discussion 0
Questions 30

When should you use the force-unlock command?

Options:

A.  

You have a high priority change

B.  

Automatic unlocking failed

C.  

apply failed due to a state lock

D.  

You see a status message that you cannot acquire the lock

Discussion 0
Questions 31

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

Discussion 0
Questions 32

Which command lets you experiment with terraform expressions?

Options:

A.  

Terraform console

B.  

Terraform validate

C.  

Terraform env

D.  

Terraform test

Discussion 0
Questions 33

Which are forbidden actions when the terraform state file is locked? Choose three correct answers.

Options:

A.  

Terraform state list

B.  

Terraform destroy

C.  

Terraform validate

D.  

Terraform validate

E.  

Terraform for

F.  

Terraform apply

Discussion 0
Questions 34

Which of the following is not a valid siring function in Terraform?

Options:

A.  

choaf

B.  

join

C.  

Split

D.  

slice

Discussion 0
Questions 35

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

Options:

A.  

Provider

B.  

Resource ID

C.  

Resource address

D.  

Path

Discussion 0
Questions 36

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.

Discussion 0
Questions 37

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

Discussion 0
Questions 38

What does this code do?

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

Discussion 0
Questions 39

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

Discussion 0
Questions 40

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

Discussion 0
Questions 41

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

Discussion 0
Questions 42

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

Discussion 0
Questions 43

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

Discussion 0
Questions 44

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

Discussion 0
Questions 45

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

Discussion 0
Questions 46

terraform plan updates your state file.

Options:

A.  

True

B.  

False

Discussion 0
Questions 47

Why does this backend configuration not follow best practices?

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

Discussion 0
Questions 48

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

Discussion 0