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

Terraform-Associate-004 Questions and Answers

Question # 6

Your team uses HCP Terraform to manage infrastructure. You need to make a change to an infrastructure stack running in a public cloud. Which pattern follows Infrastructure as Code best practices for making the change?

A.

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

B.

Use the public cloud console to make the change.

C.

Make the change through the public cloud API endpoint.

D.

Run the public cloud CLI tool to make the change.

E.

Submit a pull request and wait for an approved merge of the change.

Full Access
Question # 7

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

Question # 7

A.

Option A

B.

Option B

C.

Option C

D.

Option D

Full Access
Question # 8

A Terraform output that sets the " sensitive " argument to true will not store that value in the state file.

A.

True

B.

False

Full Access
Question # 9

Which backend does the Terraform CLI use by default?

A.

Depends on the cloud provider configured

B.

HTTP

C.

Remote

D.

Terraform Cloud

E.

Local

Full Access
Question # 10

A terraform apply can not _________ infrastructure.

A.

change

B.

destroy

C.

provision

D.

import

Full Access
Question # 11

INcheck block ' s assertion fails, Terraform blocks the current operation from executing.

A.

True

B.

False

Full Access
Question # 12

Which of the following isnotan advantage of using Infrastructure as Code (IaC) operations?

A.

Self-service infrastructure deployment.

B.

Modify a count parameter to scale resources.

C.

API-driven workflows.

D.

Troubleshoot via a Linux diff command.

E.

Public cloud console configuration workflows.

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

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

Full Access
Question # 15

Part of a configuration is shown in the exhibit below.

You want to pass the id of the vsphere_datacenter data source to the datacenter_id argument of the vsphere_folder resource.

Question # 15 Which reference would you use?

A.

data.vsphere_datacenter.dc.id

B.

data.vsphere_datacenter.dc

C.

data.dc.id

D.

vsphere_datacenter.dc.id

Full Access
Question # 16

Before you can use a new backend or HCP Terraform/Terraform Cloud integration, you must first execute terraform init.

A.

True

B.

False

Full Access
Question # 17

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

Exhibit:

Error: Saved plan is stale

The given plan file can no longer be applied because the state was changed by another operation after the plan was created.

You have a saved execution plan containing desired changes for infrastructure managed by Terraform. After running terraform apply my.tfplan, you receive the error shown. How can you apply the desired changes? (Pick the 2 correct responses below.)

A.

Generate a new execution plan file with terraform plan, and apply the new plan.

B.

Run terraform apply without the saved execution plan.

C.

Force the apply command by adding the flag -lock=false.

D.

Refresh the current state data using the -refresh-only flag.

E.

Update the current plan file using the terraform state push command.

Full Access
Question # 19

You just scaled your VM infrastructure and realize you set the count variable to the wrong value. You correct the value and save your change. What must you do next to make your infrastructure match your configuration?

A.

Reinitialize because your configuration has changed.

B.

Inspect all Terraform outputs to make sure they are correct.

C.

Inspect your Terraform state because you want to change it.

D.

Run terraform apply and confirm the planned changes.

Full Access
Question # 20

You need to deploy resources into two different regions in the same Terraform configuration using the block shown in the exhibit below.

Question # 20 What do you need to add to the provider configuration to deploy the resource to the us-west-2 AWS region?

A.

B.

B.

C.

C.

D.

D.

Full Access
Question # 21

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

numcpus = [ 18, 3, 7, 11, 2 ]

What Terraform function could you use to select the largest number from the list?

A.

top(numcpus)

B.

max(numcpus)

C.

ceil (numcpus)

D.

hight[numcpus]

Full Access
Question # 22

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 delete the VM using the cloud provider console, then run terraform apply again without changing any Terraform code?

A.

Terraform will recreate the VM.

B.

Terraform will report an error.

C.

Terraform will remove the VM from the state file.

D.

Terraform will not make any changes.

Full Access
Question # 23

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

A.

True

B.

False

Full Access
Question # 24

Exhibit:

data " aws_ami " " web " {

most_recent = true

owners = [ " self " ]

tags = {

Name = " web-server "

}

}

A data source is shown in the exhibit. How do you reference the id attribute of this data source?

A.

aws_ami.web.id

B.

web.id

C.

data.aws_ami.web.id

D.

data.web.id

Full Access
Question # 25

If you update the version constraint in your Terraform configuration, Terraform will update your lock file the next time you run terraform Init.

A.

True

B.

False

Full Access
Question # 26

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

If a module declares a variable without a default value, you must pass the value of the variable within the module block when you call the module in your configuration.

A.

True

B.

False

Full Access
Question # 28

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

A.

True

B.

False

Full Access
Question # 29

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

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

The terraform output command shows outputs from child modules.

A.

True

B.

False

Full Access
Question # 33

You want to use API tokens and other secrets within your team ' s Terraform workspaces. Where does HashiCorp recommend you store these sensitive values?

(Pick 3 correct responses)

A.

In a plaintext document on a shared drive.

B.

In a terraform.tfvars file, checked into version control.

C.

In a terraform.tfvars file, securely managed and shared with your team.

D.

In an HCP Terraform/Terraform Cloud variable, with the sensitive option checked.

E.

In HashiCorp Vault.

Full Access
Question # 34

Which command(s) adds existing resources in a public cloud into Terraform state?

A.

terraform init

B.

terraform plan

C.

terraform refresh

D.

terraform import

E.

All of these

Full Access
Question # 35

Your configuration contains a module block that references a module from the Terraform Registry and sets the version argument to 1.0. You just published a new version of the module and updated your configuration to point to version 1.1.

Which command must be run to install the new version?

A.

terraform init

B.

terraform modules

C.

terraform plan

D.

terraform apply

Full Access
Question # 36

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

The public Terraform Module Registry is free to use.

A.

True

B.

False

Full Access
Question # 38

Which of the following are advantages of using infrastructure as code (laC) instead of provisioning with a graphical user interface (GUI)? Choose two correct answers.

A.

Prevents manual modifications to your resources

B.

Lets you version, reuse, and share infrastructure configuration

C.

Secures your credentials

D.

Provisions the same resources at a lower cost

E.

Reduces risk of operator error

Full Access
Question # 39

A resource block is shown in the Exhibit space of this page. How would you reference the name value of the second instance of this resource?

A.

aws_instance.web[2].name

B.

aws_instance.web.*.name

C.

aws_instance.web[l].name

D.

aws_instance.web[l]

E.

element(aws_instance.web, 2)

Full Access
Question # 40

What is terraform plan -refresh-only intended to detect?

A.

Terraform configuration code changes

B.

Corrupt state files

C.

State file drift

D.

Empty state files

Full Access
Question # 41

The exhibit below shows part of a Terraform configuration you have been asked to update. The name of the Azure Virtual Network should be set to the name of the resource group followed by a dash and the word vnet.

Exhibit:

data " azurerm_resource_group " " example " {

name = var.resource_group_name

}

resource " azurerm_virtual_network " " example " {

name = ______________________

}

Which expression fulfills this requirement?

A.

" ${data.azurerm_resource_group.example.name}-vnet "

B.

concat(data.azurerm_resource_group.example.name, " - " , " vnet " )

C.

join( " - " , var.resource_group_name, " vnet " )

D.

" ${azurerm_resource_group.example.name}-vnet "

Full Access
Question # 42

If one of your modules uses a local value, you can expose that value to callers of the module by defining a Terraform output in the module’s configuration.

A.

True

B.

False

Full Access
Question # 43

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

A child module can always access variables declared in its parent module.

A.

True

B.

False

Full Access
Question # 45

Where does HashiCorp recommend you store API tokens and other secrets within your team’s Terraform workspaces?

Pick the three correct responses below.

A.

In a plaintext document on a shared drive.

B.

In HashiCorp Vault.

C.

In a terraform.tfvars file, checked into your version control system.

D.

In an environment variable and referenced with TF_VAR_variablename.

E.

In an HCP Terraform variable, with the sensitive option checked.

Full Access
Question # 46

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

You provisioned virtual machines (VMs) on Google Cloud Platform using the gcloud command-line tool.

What must be done to manage these VMs using Terraform instead? Pick the two correct responses.

A.

Pick the two correct responses below.

B.

Run terraform state pull.

C.

Add an import block to the configuration.

D.

Add a resource block for the existing VM.

E.

Run terraform apply -refresh-only.

Full Access
Question # 48

Which of these are features of HCP Terraform/Terraform Cloud? (Pick the 2 correct responses)

A.

Automatic backups of configuration and state.

B.

Remote state storage.

C.

Automated infrastructure deployment visualization.

D.

A web-based user interface (UI).

Full Access
Question # 49

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

A.

A web-based user interface (Ul)

B.

Automated infrastructure deployment visualization

C.

Automatic backups

D.

Remote state storage

Full Access
Question # 50

While attempting to deploy resources into your cloud provider using Terraform, you begin to see some odd behavior and experience slow responses. In order to troubleshoot you decide to turn on Terraform debugging. Which environment variables must be configured to make Terraform ' s logging more verbose?

A.

TF_LOG_PAIH

B.

TF_LOG

C.

TF_VAR_log_path

D.

TF_VAR_log_level

Full Access
Question # 51

If you don’t use the local Terraform backend, where else can Terraform save resource state?

A.

In a remote location configured in the terraform block, such as HCP Terraform or a cloud storage system.

B.

In a remote location configured in the -terraformrc file, such as HCP Terraform or a cloud storage system.

C.

In memory.

D.

In an environment variable.

Full Access
Question # 52

Infrastructure as Code (laC) can be stored in a version control system along with application code.

A.

True

B.

False

Full Access
Question # 53

terraform init creates an example main.tf file in the current directory.

A.

True

B.

False

Full Access
Question # 54

You’ve just finished refactoring part of your Terraform workspace’s configuration to use a module to manage some of your resources. When you plan your changes, you notice that Terraform will destroy and recreate the affected resources. Doing so could cause unintended downtime in the application your workspace manages. What supported approach should you take to complete the refactor without destroying and recreating your resources?

A.

Add moved blocks to your configuration to let Terraform know the new resource addresses for the affected resources.

B.

Run the terraform console command to edit your workspace ' s state and update the resource names.

C.

Manually edit your terraform.tfstate file and update the resource names.

D.

Open your cloud provider ' s console and rename the affected resources.

Full Access
Question # 55

Terraform configuration can only import modules from the public registry.

A.

True

B.

False

Full Access
Question # 56

What is the purpose of state locking in a remote backend?

A.

Encrypts the state in the remote backend.

B.

Requires every instance of Terraform to use the same provider version.

C.

Creates a backup of the state file in a secure location.

D.

Ensures only one instance of Terraform can modify the state at a time.

Full Access
Question # 57

How does the use of Infrastructure as Code (IaC) enhance the reliability of your infrastructure?

Pick the two correct responses below.

A.

Proposed changes can be reviewed before being applied.

B.

Infrastructure is automatically scaled to meet demand.

C.

Incorrect configurations cannot be deployed.

D.

Updates are deployed with zero downtime.

E.

Configuration drift is reduced with declarative definitions.

Full Access
Question # 58

How can you configure a Terraform workspace to store its state remotely?

A.

Add a cloud block inside the terraform block.

B.

Add a backend block inside the terraform block.

C.

Set the TERAFORM_CLOUD environment variable.

D.

Set the TERRAFORM_BACKEND environment variable.

Full Access
Question # 59

Terraform configuration can only call modules from the public registry.

A.

True

B.

False

Full Access
Question # 60

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

All modules published on the official Terraform Module Registry have been verified by HasihCorp.

A.

True

B.

False

Full Access
Question # 62

When you use a backend that requires authentication, it is best practice to:

A.

Run all Terraform commands on a shared server or container.

B.

Configure the authentication credentials in your Terraform configuration files, and store them in version control.

C.

Use environment variables to configure authentication credentials outside of your Terraform configuration.

D.

None of the above.

Full Access
Question # 63

Your root module contains a variable namednum_servers. Which is the correct way to pass its value to a child module with an input namedservers?

A.

servers = num_servers

B.

servers = var(num_servers)

C.

servers = var.num_servers

D.

servers = ${var.num_servers}

Full Access
Question # 64

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

All standard backend types support state locking, and remote operations like plan, apply, and destroy.

A.

True

B.

False

Full Access
Question # 66

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

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

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.

Option A

B.

Option B

C.

Option C

D.

Option D

Full Access
Question # 69

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

A.

True

B.

False

Full Access
Question # 70

What does this code do?

terraform { required_providers { aws = " > = 3.0 " }}

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

Full Access
Question # 71

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

A.

chomp

B.

join

C.

slice

D.

split

Full Access
Question # 72

Which of the following is true about terraform apply?(Pick 2 correct responses)

A.

You must pass the output of a terraform plan command to it.

B.

By default, it does not refresh your state file to reflect the current infrastructure configuration.

C.

Depending on provider specification, Terraform may need to destroy and recreate your infrastructure resources.

D.

You cannot target specific resources for the operation.

E.

It only operates on infrastructure defined in the current working directory or workspace.

Full Access
Question # 73

Only the user that generated a plan may apply it.

A.

True

B.

False

Full Access
Question # 74

Terraformrequiresthe Go runtime as a prerequisite for installation.

A.

True

B.

False

Full Access
Question # 75

Select the command that doesn’t cause Terraform to refresh its state.

A.

Terraform destroy

B.

Terraform apply

C.

Terraform plan

D.

Terraform state list

Full Access
Question # 76

Which of the following should you add in the required_providers block to define a provider version constraint?

A.

version ~ > 3.1

B.

version > = 3.1

C.

version = " > = 3.1 "

Full Access
Question # 77

When using Terraform to deploy resources into Azure, which scenarios are true regarding state files? (Choose two.)

A.

When you change a Terraform-managed resource via the Azure Cloud Console, Terraform updates the state file to reflect the change during the next plan or apply

B.

Changing resources via the Azure Cloud Console records the change in the current state file

C.

When you change a resource via the Azure Cloud Console, Terraform records the changes in a new state file

D.

Changing resources via the Azure Cloud Console does not update current state file

Full Access
Question # 78

Which of the following is not an action performed by terraform init?

A.

Initialize a configured backend.

B.

Create template configuration files.

C.

Load required provider plugins.

D.

Retrieve the source code for all referenced modules.

Full Access
Question # 79

You are creating a reusable Terraform configuration and want to include an optional billing_dept tag so your Finance team can track team-specific spending on resources. Which of the following billing_dept variable declarations will achieve this?

A.

variable " billing_dept " {default = " " }

B.

variable " billing_dept " {optional = true}

C.

variable " billing_dept " {type = optional(string)}

D.

variable " billing_dept " {type = default}

Full Access
Question # 80

Terraform encrypts sensitive values stored in your state file.

A.

True

B.

False

Full Access
Question # 81

Which of the following ate advantages of using infrastructure as code (laC) instead of provisioning with a graphical user interface (GUI)? Choose two correct answers.

A.

Lets you version, reuse, and share infrastructure configuration

B.

Provisions the same resources at a lower cost

C.

Secures your credentials

D.

Reduces risk of operator error

E.

Prevents manual modifications to your resources

Full Access
Question # 82

You are tasked with making a change to an infrastructure stack running in a public cloud using HCP Terraform/Terraform Cloud. Which pattern follows IaC best practices?

A.

Make the change via the public cloud API endpoint.

B.

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

C.

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

D.

Use the public cloud console to make the change after approval.

E.

Make the change programmatically via the cloud CLI.

Full Access
Question # 83

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

A.

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

B.

You want Terraform to ignore a resource on the next apply.

C.

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

D.

You want Terraform to destroy all the infrastructure in your workspace.

Full Access
Question # 84

Which of the following is not a valid source path for specifying a module?

A.

source - " github.com/hashicorp/examplePref-ul.0.8M

B.

source = " ./module?version=vl.6.0 "

C.

source - " hashicorp/consul/aws "

D.

source - " ./module "

Full Access
Question # 85

When does Sentinel enforce policy logic during a Terraform Cloud run?

A.

Before the plan phase

B.

During the plan phase

C.

Before the apply phase

D.

After the apply phase

Full Access
Question # 86

Exhibit:

resource " kubernetes_namespace " " example " {

name = " test "

}

A resource block is shown in the exhibit. How would you reference the name attribute of this resource in HCL?

A.

kubernetes_namespace.example,name

B.

kubernetes_namespace.test.name

C.

data.kubernetes_namespace.name

D.

resource.kubernetes_namespace.example.name

Full Access
Question # 87

Which of the following can you do with terraform plan? (Pick 2 correct responses)

A.

Schedule Terraform to run at a planned time in the future.

B.

View the execution plan and check if the changes match your expectations.

C.

Save a generated execution plan to apply later.

D.

Execute a plan in a different workspace.

Full Access
Question # 88

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

How can you trigger a run in a Terraform Cloud workspace that is connected to a Version Control System (VCS) repository?

A.

Only Terraform Cloud organization owners can set workspace variables on VCS connected workspaces

B.

Commit a change to the VCS working directory and branch that the Terraform Cloud workspace is connected to

C.

Only Terraform Cloud organization owners can approve plans in VCS connected workspaces

D.

Only members of a VCS organization can open a pull request against repositories that are connected to Terraform Cloud workspaces

Full Access
Question # 90

Variables declared within a module are accessible outside of the module.

A.

True

B.

False

Full Access
Question # 91

You are responsible for a set of infrastructure that is managed by two workspaces: example-network and example-compute. The example-compute workspace uses data from output values configured in the example-network workspace and must be deployed afterward. Currently, this is a manual process:

An operator deploys changes to the example-network workspace.

They manually copy the output values from the example-network workspace to input variables configured for the example-compute workspace.

They deploy the example-compute workspace.

Which HCP Terraform features can you use to automate this process?

Pick the two correct responses below.

A.

A health check configured on the example-network workspace to create a plan on the example-compute workspace when HCP Terraform applies changes to it.

B.

A health check configured on the example-compute workspace to create a plan when HCP Terraform applies changes to the example-network workspace.

C.

A tfe_outputs data source configured in the example-compute workspace to automatically load output values from the example-network workspace.

D.

A run trigger configured on the example-network workspace to automatically plan changes to the example-compute workspace after every apply.

E.

A run trigger configured on the example-compute workspace to automatically plan changes after HCP Terraform applies changes to the example-network workspace.

Full Access
Question # 92

Which of the following does HCP Terraform perform during a health assessment for a workspace?

A.

Terraform test execution

B.

Check block validation

C.

Infrastructure cost estimation

D.

Resource drift detection

E.

Sentinel policy checks

Full Access
Question # 93

Which is not a benefit of adopting IaC (Infrastructure as Code)?

A.

Reusability of code

B.

Automation

C.

A GUI (Graphical User Interface)

D.

Versioning

Full Access
Question # 94

terraform apply is failing with the following error. What next step should you take to determine the root cause of the problem?

Error:

yaml

CopyEdit

Error loading state: AccessDenied: Access Denied

status code: 403, request id: 288766CE5CCA24A0, host id: web.example.com

A.

Run terraform login to reauthenticate with the provider.

B.

Set TF_LOG=DEBUG.

C.

Review /var/log/terraform.log for error messages.

D.

Review syslog for Terraform error messages.

Full Access
Question # 95

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

A senior admin accidentally deleted some of your cloud instances. What will Terraform do when you run terraform apply?

A.

Tear down the entire workspace ' s infrastructure and rebuild it.

B.

Build a completely brand new set of infrastructure.

C.

Rebuild only the instances that were deleted.

D.

Stop and generate an error message about the missing instances.

Full Access
Question # 97

Which argument can you set on a module block to prevent Terraform from updating the module’s configuration during an init or get operation?

A.

version

B.

lifecycle

C.

count

D.

source

Full Access
Question # 98

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?

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

Full Access
Question # 99

By default, if you do not define a backend for your configuration, where does Terraform store information about the resources that it manages?

A.

A subdirectory of your home directory named .terraform.d

B.

A file in your configuration ' s directory named terraform.tfstate

C.

A file in your configuration ' s directory named .terraform.lock.hcl

D.

A subdirectory of your configuration named .terraform

Full Access
Question # 100

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

You modified your Terraform configuration to fix a typo in the resource ID by renaming it from photoes to photos. What configuration will you add to update the resource ID in state without destroying the existing resource?

Original configuration:

resource " aws_s3_bucket " " photoes " {

bucket_prefix = " images "

}

Updated configuration:

resource " aws_s3_bucket " " photos " {

bucket_prefix = " images "

}

A.

moved {from = aws_s3_bucket.photoesto = aws_s3_bucket.photos}

B.

moved {bucket.photoes = aws_s3_bucket.photos}

C.

moved {aws_s3_bucket.photoes = aws_s3_bucket.photos}

D.

None. Terraform will automatically update the resource ID.

Full Access
Question # 102

Which statement describes a goal of Infrastructure as Code (IaC)?

A.

A pipeline process to test and deliver software.

B.

Write once, run anywhere.

C.

The programmatic configuration of resources.

D.

Defining a vendor-agnostic API.

Full Access
Question # 103

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

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

Full Access
Question # 104

Which of these statements about HCP Terraform/Terraform Cloud workspaces is false?

A.

They can securely store cloud credentials.

B.

They have role-based access controls.

C.

Plans and applies can be triggered via version control system integrations.

D.

You must use the CLI to switch between workspaces.

Full Access
Question # 105

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

Which of the following can you do with terraform plan?

Pick the two correct responses below.

A.

Save a generated execution plan to apply later.

B.

View the execution plan and check whether the changes match your expectations.

C.

Schedule Terraform to run at a planned time in the future.

D.

Execute a plan in a different workspace.

Full Access
Question # 107

You should run terraform fnt to rewrite all Terraform configurations within the current working directory to conform to Terraform-style conventions.

A.

True

B.

False

Full Access