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

Terraform-Associate-003 Questions and Answers

Question # 6

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

A.

The resource block

B.

The data source block

C.

The terraform block

D.

The provider block

Full Access
Question # 7

Which task does terraform init not perform?

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

Full Access
Question # 8

Only the user that generated a plan may apply it.

A.

True

B.

False

Full Access
Question # 9

How does Terraform manage most dependencies between resources?

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

Full Access
Question # 10

What does the default "local" Terraform backend store?

A.

tfplan files

B.

State file

C.

Provider plugins

D.

Terraform binary

Full Access
Question # 11

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

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)

Full Access
Question # 12

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?

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

Full Access
Question # 13

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?

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

Full Access
Question # 14

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

A.

Source = “module/consul’’

B.

Source = ‘’githhub.comicrop/example’’

C.

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

D.

Source = ‘’hasicrop/consul/aws’’

Full Access
Question # 15

Which of these is true about Terraform's plugin-based architecture?

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

Full Access
Question # 16

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

A.

State locking

B.

Version control

C.

Provider constraints

D.

Remote backends

Full Access
Question # 17

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?

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

Full Access
Question # 18

Which command add existing resources into Terraform state?

A.

Terraform init

B.

Terraform plan

C.

Terraform refresh

D.

Terraform import

E.

All of these

Full Access
Question # 19

Define the purpose of state in Terraform.

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

Full Access
Question # 20

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

A.

With a tab

B.

With two spaces

C.

With four spaces

D.

With three spaces

Full Access
Question # 21

What does state looking accomplish?

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

Full Access
Question # 22

When should you run terraform init?

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.

Full Access
Question # 23

You much initialize your working directory before running terraform validate.

A.

True

B.

False

Full Access
Question # 24

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

A)

B)

C)

D)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Full Access
Question # 25

Which configuration consistency errors does terraform validate report?

A.

Terraform module isn't the latest version

B.

Differences between local and remote state

C.

Declaring a resource identifier more than once

D.

A mix of spaces and tabs in configuration files

Full Access
Question # 26

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)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Full Access
Question # 27

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

A.

True

B.

False

Full Access
Question # 28

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)

B)

C)

D)

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Full Access
Question # 29

When you use a remote backend that needs authentication, HashiCorp recommends that you:

A.

Write the authentication credentials in the Terraform configuration files

B.

Keep the Terraform configuration files in a secret store

C.

Push your Terraform configuration to an encrypted git repository

D.

Use partial configuration to load the authentication credentials outside of the Terraform code

Full Access
Question # 30

You can reference a resource created with for_each using a Splat ( *) expression.

A.

True

B.

False

Full Access
Question # 31

Which of these ate features of Terraform Cloud? Choose two correct answers.

A.

Automated infrastructure deployment visualization

B.

Automatic backups

C.

A web-based user interface (Ul)

D.

Remote state storage

Full Access
Question # 32

You cannot install third party plugins using terraform init.

A.

True

B.

False

Full Access
Question # 33

What information does the public Terraform Module Registry automatically expose about published modules?

A.

Required input variables

B.

Optional inputs variables and default values

C.

Outputs

D.

All of the above

E.

None of the above

Full Access
Question # 34

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

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

Full Access
Question # 35

You ate making changes to existing Terraform code to add some new infrastructure. When is the best time to run terraform validate?

A.

After you run terraform apply so you can validate your infrastructure

B.

Before you run terraform apply so you can validate your provider credentials

C.

Before you run terraform plan so you can validate your code syntax

D.

After you run terraform plan so you can validate that your state file is consistent with your infrastructure

Full Access
Question # 36

How does the Terraform cloud integration differ from other state backends such as S3, Consul,etc?

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

Full Access
Question # 37

Why does this backend configuration not follow best practices?

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

Full Access
Question # 38

Terraform providers are always installed from the Internet.

A.

True

B.

False

Full Access
Question # 39

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

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

Full Access
Question # 40

Changing the Terraform backend from the default "local" backend to a different one after performing your first terrafom apply is:

A.

Optional

B.

Impossible

C.

Mandatory

D.

Discouraged

Full Access
Question # 41

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

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

Full Access
Question # 42

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?

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

Full Access
Question # 43

Which backend does the Terraform CU use by default?

A.

Depends on the cloud provider configured

B.

HTTP

C.

Remote

D.

Terraform Cloud

E.

Local

Full Access
Question # 44

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

A.

True

B.

False

Full Access
Question # 45

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

A.

True

B.

False

Full Access
Question # 46

When should you write Terraform configuration files for existing infrastructure that you want to start managing with Terraform?

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

Full Access
Question # 47

What type of block is used to construct a collection of nested configuration blocks?

A.

Dynamic

B.

For_each

C.

Nesting

D.

repeated.

Full Access
Question # 48

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.

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

Full Access