Labour Day Sale Limited Time 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: buysanta

Exact2Pass Menu

Question # 4

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 # 5

Which type of block fetches or computes information for use elsewhere in a Terraform configuration?

A.

data

B.

local

C.

resource

D.

provider

Full Access
Question # 6

You cannot install third party plugins using terraform init.

A.

True

B.

False

Full Access
Question # 7

Which of the following is not true of Terraform providers?

A.

An individual person can write a Terraform Provider

B.

A community of users can maintain a provider

C.

HashiCorp maintains some providers

D.

Cloud providers and infrastructure vendors can write, maintain, or collaborate on Terraform

E.

providers

F.

None of the above

Full Access
Question # 8

Which provider authentication method prevents credentials from being stored in the state file?

A.

Using environment variables

B.

Specifying the login credentials in the provider block

C.

Setting credentials as Terraform variables

D.

None of the above

Full Access
Question # 9

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 # 10

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 # 11

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?

A.

Data.vsphere_datacenter.DC.id

B.

Vsphere_datacenter.dc.id

C.

Data,dc,id

D.

Data.vsphere_datacenter,dc

Full Access
Question # 12

In a Terraform Cloud workspace linked to a version control repository, speculative plan runs start automatically when you merge or commit changes to version control.

A.

True

B.

False

Full Access
Question # 13

Why would you use the -replace flag for terraform apply?

A.

You want Terraform to ignore a resource on the next apply

B.

You want Terraform to destroy all the infrastructure in your workspace

C.

You want to force Terraform to destroy a resource on the next apply

D.

You want to force Terraform to destroy and recreate a resource on the next apply

Full Access
Question # 14

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

A.

version >= 3.1

B.

version = “>= 3.1”

C.

version ~> 3.1

Full Access
Question # 15

You decide to move a Terraform state file to Amazon S3 from another location. You write the code below into a file called backend.tf.

Which command will migrate your current state file to the new S3 remote backend?

A.

terraform state

B.

terraform init

C.

terraform push

D.

terraform refresh

Full Access
Question # 16

Module variable assignments are inherited from the parent module and you donotneed to explicitly set them.

A.

True

B.

False

Full Access
Question # 17

How is terraform import run?

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

Full Access
Question # 18

Terraform providers are always installed from the Internet.

A.

True

B.

False

Full Access
Question # 19

Which of the following commands would you use to access all of the attributes and details of a resource managed by Terraform?

A.

terraform state list ‘provider_type.name’

B.

terraform state show ‘provider_type.name’

C.

terraform get ‘provider_type.name’

D.

terraform state list

Full Access
Question # 20

Which of the following is not a valid Terraform collection type?

A.

Tree

B.

Map

C.

List

D.

set

Full Access
Question # 21

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 # 22

You modified your Terraform configuration and run Terraform plan to review the changes. Simultaneously, your teammate manually modified the infrastructure component you are working on. Since you already ran terraform plan locally, the execution plan for terraform apply will be the same.

A.

True

B.

False

Full Access
Question # 23

A developer on your team is going lo leaf down an existing deployment managed by Terraform and deploy a new one. However, there is a server resource named aws instant.ubuntu[l] theywould like to keep. What command should they use to tell Terraform to stop managing that specific resource?

A.

Terraform plan rm:aws_instance.ubuntu[1]

B.

Terraform state rm:aws_instance.ubuntu[1]

C.

Terraform apply rm:aws_instance.ubuntu[1]

D.

Terraform destory rm:aws_instance.ubuntu[1]

Full Access
Question # 24

How does Terraform determine dependencies between resources?

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

Full Access
Question # 25

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

A.

True

B.

False

Full Access
Question # 26

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
Question # 27

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

A.

True

B.

False

Full Access
Question # 28

What does Terraform not reference when running a terraform apply -refresh-only ?

A.

State file

B.

Credentials

C.

Cloud provider

D.

Terraform resource definitions in configuration files

Full Access
Question # 29

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 # 30

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

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

Full Access
Question # 31

How can a ticket-based system slow down infrastructure provisioning and limit the ability to scale? Choose two correct answers.

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

Full Access
Question # 32

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 # 33

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

A.

True

B.

False

Full Access
Question # 34

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 # 35

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

A.

True

B.

False

Full Access
Question # 36

Which two steps are required to provision new infrastructure in the Terraform workflow? Choose two correct answers.

A.

Plan

B.

Import

C.

Alidate

D.

Init

E.

apply

Full Access
Question # 37

Which command lets you experiment with terraform expressions?

A.

Terraform console

B.

Terraform validate

C.

Terraform env

D.

Terraform test

Full Access
Question # 38

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?

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

Full Access
Question # 39

You have used Terraform lo create an ephemeral development environment in the (loud and are now ready to destroy all the Infrastructure described by your Terraform configuration To be safe, you would like to first see all the infrastructure that Terraform will delete.

Which command should you use to show all of the resources that mil be deleted? Choose two correct answers.

A.

Run terraform state rm ‘

B.

Run terraform show :destroy

C.

Run terraform destroy and it will first output all the resource that will be deleted before prompting for approval

D.

Run terraform plan .destory

Full Access
Question # 40

A Terraform provider is NOT responsible for:

A.

Exposing resources and data sources based on an APUI

B.

Managing actions to take based on resources differences

C.

Understanding API interactions with some service

D.

Provisioning infrastructure in multiple

Full Access
Question # 41

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 # 42

When do changes invoked by terraform apply take effect?

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

Full Access
Question # 43

Which Terraform collection type should you use to store key/value pairs?

A.

Set

B.

Map

C.

Tuple

D.

list

Full Access
Question # 44

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 # 45

As a member of an operations team that uses infrastructure as code (lac) practices, you are tasked with making a change to an infrastructure stack running in a public cloud. Which pattern would follow laC best practices for making a change?

A.

Make the change via the public cloud API endpoint

B.

Clone the repository containing your infrastructure code and then run the code

C.

Use the public cloud console to make the change after a database record has been approved

D.

Make the change programmatically via the public cloud CLI

E.

Submit a pull request and wait for an approved merge of the proposed changes

Full Access
Question # 46

Which of the following command would be use to access all of the attributes and details of a resource managed by Terraform?

A.

Terraform state show ‘ provider_type_name

B.

Terraform state list

C.

Terraform get provider_type_name

D.

Terraform state list provider_type_name

Full Access
Question # 47

Where does the Terraform local backend store its state?

A.

In the terraform file

B.

In the /tmp directory

C.

In the terraform,tfstate file

D.

In the user’s terraform,state file

Full Access
Question # 48

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