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

Terraform-Associate-003 Questions and Answers

Question # 6

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

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

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

You created infrastructure outside the Terraform workflow that you now want to manage using Terraform. Which command brings the infrastructure into Terraform state?

A.

terraform get

B.

terraform refresh

C.

terraform import

D.

terraform init

Full Access
Question # 10

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

Which Terraform command checks that your configuration syntax is correct?

A.

terraform validate

B.

terraform init

C.

terraform show

D.

terraform fmt

Full Access
Question # 12

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

What functionality do providers offer in Terraform?(Pick 3 correct responses)

A.

Interact with cloud provider APIs.

B.

Provision resources for on-premises infrastructure services.

C.

Group a collection of Terraform configuration files that map to a single state file.

D.

Provision resources for public cloud infrastructure services.

E.

Enforce security and compliance policies.

Full Access
Question # 14

Terraform providers are part of the Terraform core binary.

A.

True

B.

False

Full Access
Question # 15

When you include a module block in your configuration that references a module from the Terraform Registry, the "version" attribute is required.

A.

True

B.

False

Full Access
Question # 16

Terraform encrypts sensitive values stored in your state file.

A.

True

B.

False

Full Access
Question # 17

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?

A.

Local values

B.

Count arguments

C.

Collection functions

D.

Dynamic blocks

Full Access
Question # 18

You use a cloud provider account that is shared with other team members. You previously used Terraform to create a load balancer that listens on port 80. After application changes, you updated the Terraform code to change the port to 443.

You run terraform plan and see that the execution plan shows the port changing from 80 to 443 like you intended and step away to grab some coffee.

In the meantime, another team member manually changes the load balancer port to 443 through the cloud provider console before you get back to your desk.

What will happen when you run terraform apply upon returning to your desk?

A.

Terraform will recreate the load balancer.

B.

Terraform will fail with an error because the state file is no longer accurate.

C.

Terraform will change the load balancer port to 80, and then change it back to 443.

D.

Terraform will not make any changes to the load balancer and will update the state file to reflect the manual change.

Full Access
Question # 19

The public Terraform Module Registry is free to use.

A.

True

B.

False

Full Access
Question # 20

Which of these ate secure options for storing secrets for connecting to a Terraform remote backend? Choose two correct answers.

A.

A variable file

B.

Defined in Environment variables

C.

Inside the backend block within the Terraform configuration

D.

Defined in a connection configuration outside of Terraform

Full Access
Question # 21

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] they would 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 # 22

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?

A.

Terraform data sources

B.

Terraform local values

C.

Terraform modules

D.

Terraform workspaces

E.

None of the above

Full Access
Question # 23

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

Terraform variable names are saved in the state file.

A.

True

B.

False

Full Access
Question # 25

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

You have a simple Terraform configuration containing one virtual machine (VM) in a cloud provider. You run terraform apply and the VM is created successfully. What will happen if you terraform apply again immediately afterward without changing any Terraform code?

A.

Terraform will terminate and recreate the VM.

B.

Terraform will create another duplicate VM.

C.

Terraform will apply the VM to the state file.

D.

Nothing

Full Access
Question # 27

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

What is the workflow for deploying new infrastructure with Terraform?

A.

Write Terraform configuration, run terraform init to initialize the working directory orworkspace, 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

Full Access
Question # 29

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

A.

Tree

B.

Map

C.

List

D.

set

Full Access
Question # 30

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

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

A.

True

B.

False

Full Access
Question # 32

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

A.

True

B.

False

Full Access
Question # 33

Which of the following is not a way to trigger terraform destroy?

A.

Using the destroy command with auto-approve.

B.

Passing --destroy at the end of a plan request.

C.

Running terraform destroy from the correct directory and then typing yes when prompted in the CLI.

Full Access
Question # 34

When do you need to explicitly execute Terraform in refresh-only mode?

A.

Before every terraform plan.

B.

Before every terraform apply.

C.

Before every terraform import.

D.

None of the above.

Full Access
Question # 35

Where can Terraform not load a provider from?

A.

Plugins directory

B.

Provider plugin chance

C.

Official HashCrop Distribution on releases.hashcrop.com

D.

Source code

Full Access
Question # 36

A Terraform backend determines how Terraform loads state and stores updates when you execute which command?

A.

apply

B.

destroy

C.

Both of these are correct.

D.

Neither of these are correct.

Full Access
Question # 37

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

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

Which of the following locations can Terraform use as aprivate sourcefor modules?(Pick 2 correct responses)

A.

Public repository on GitHub.

B.

Public Terraform Registry.

C.

Internally hosted VCS (Version Control System) platform.

D.

Private repository on GitHub.

Full Access
Question # 40

What is the provider for this resource?

A.

Vpc

B.

Test

C.

Main

D.

aws

Full Access
Question # 41

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

A.

True

B.

False

Full Access
Question # 42

Which command should you run to check if all code in a Terraform configuration that references multiple modules is properly formatted without making changes?

A.

terraform fmt -write-false

B.

terraform fmt -list -recursive

C.

terraform fmt -check -recursive

D.

terraform fmt -check

Full Access
Question # 43

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

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

What is modified when executing Terraform inrefresh-only mode?

A.

Your Terraform configuration.

B.

Your Terraform plan.

C.

Your state file.

D.

Your cloud infrastructure.

Full Access
Question # 46

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

A.

With two spaces.

B.

With four spaces.

C.

With three spaces.

D.

With a tab.

Full Access
Question # 47

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

You cannot install third party plugins using terraform init.

A.

True

B.

False

Full Access
Question # 49

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

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?

A.

Artifactory

B.

Amazon S3

C.

Terraform Cloud

D.

Git

Full Access
Question # 51

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

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

A.

True

B.

False

Full Access
Question # 53

Your security team scanned some Terraform workspaces and found secrets stored in plaintext in state files. How can you protect that data?

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

Full Access
Question # 54

What is the provider for the resource shown in the Exhibit?

resource "aws_vpc" "main" {

name = "test"

}

A.

VPC

B.

test

C.

main

D.

aws

Full Access
Question # 55

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

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

A.

True

B.

False

Full Access
Question # 57

Which of the following methods, used to provision resources into a public cloud, demonstrates the concept of infrastructure as code?

A.

curl commands manually run from a terminal

B.

A sequence of REST requests you pass to a public cloud API endpoint Most Voted

C.

A script that contains a series of public cloud CLI commands

D.

A series of commands you enter into a public cloud console

Full Access
Question # 58

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

A.

True

B.

False

Full Access
Question # 59

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

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

A.

Set

B.

Map

C.

Tuple

D.

list

Full Access
Question # 61

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?

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

Full Access
Question # 62

In a Terraform Cloud workpace linked to a version control repository speculative plan rum start automatically commit changes to version control.

A.

True

B.

False

Full Access
Question # 63

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?

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.

Full Access
Question # 64

A resource block is shown in the Exhibit space of this page. What is the Terraform resource name of the resource block?

A.

test

B.

google

C.

compute_instance

D.

main

Full Access
Question # 65

Once you configure a new Terraform backend with a terraform code block, which command(s) should you use to migrate the state file?

A.

terraform destroy, then terraform apply

B.

terraform init

C.

terraform push

D.

terraform apply

Full Access
Question # 66

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?

A.

file("id_rsa.pub")

B.

templaTefil("id_rsa.pub")

C.

filebase64("id_rsa.pub")

D.

fileset<"id_rsa.pub")

Full Access
Question # 67

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