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

Free HashiCorp Terraform-Associate-004 Practice Exam with Questions & Answers | Set: 8

Questions 71

How can you enable verbose logging to troubleshoot Terraform?

Options:
A.

Set the log level command-line flag.

B.

Set the TF_LOG environment variable.

C.

Set the log level in your terraform block.

HashiCorp Terraform-Associate-004 Premium Access
Questions 72

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

Questions 73

terraform validate confirms the syntax of Terraform configuration files.

Options:
A.

True

B.

False

Questions 74

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?

Options:
A.

servers = num_servers

B.

servers = var(num_servers)

C.

servers = var.num_servers

D.

servers = ${var.num_servers}

Questions 75

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?

Options:
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 "

Questions 76

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

Questions 77

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

Options:
A.

terraform destroy

B.

All of these will trigger terraform destroy

C.

terraform plan -destroy

D.

terraform destroy -auto-approve

Questions 78

Which of these are benefits of using Sentinel with HCP Terraform/Terraform Cloud? (Pick the 3 correct responses)

Options:
A.

You can enforce a list of approved AWS AMIs.

B.

Sentinel Policies can be written in HashiCorp Configuration Language (HCL).

C.

You can check out and check in cloud access keys.

D.

Policy-as-code can enforce security best practices.

Questions 79

Exhibit:

module " web_stack " {

source = " ./modules/web_stack "

}

Your configuration defines the module block shown in the exhibit. The web_stack module accepts an input variable named servers. Which of the following changes to the module block sets the servers variable to the value of 3?

Options:
A.

module " web_stack " {source = " ./modules/web_stack " var.servers = 3}

B.

module " web_stack " {source = " ./modules/web_stack " inputs = { servers = 3 }}

C.

module " web_stack " {source = " ./modules/web_stack " servers = 3}

D.

module " web_stack " {source = " ./modules/web_stack " inputs.servers = 3}

Questions 80

Terraform configuration (including any module references) can contain only one Terraform provider type.

Options:
A.

True

B.

False