πŸ”

TA-003 β€” questions

Page 5 of 19 Β· 368 total questions.

Topic 1 Β· Question 83

Terraform can only manage resource dependencies if you set them explicitly with the depends_on argument.

  • ATrue
  • BFalse (correct answer)
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: False

Topic 1 Β· Question 84

A terraform apply can not _________ infrastructure.

  • Achange
  • Bdestroy
  • Cprovision
  • Dimport (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: import

Topic 1 Β· Question 85

You need to constrain the GitHub provider to version 2.1 or greater. Which of the following should you put into the Terraform 0.12 configuration's provider block?

  • Aversion >= 2.1
  • Bversion ~> 2.1
  • Cversion = "<= 2.1"
  • Dversion = ">= 2.1" (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: version = ">= 2.1"

Topic 1 Β· Question 86

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

  • ARun an apply and confirm the planned changes (correct answer)
  • BInspect your Terraform state because you want to change it
  • CReinitialize because your configuration has changed
  • DInspect all Terraform outputs to make sure they are correct
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Run an apply and confirm the planned changes This option scales automatically to match demand.

Topic 1 Β· Question 87

Terraform provisioners that require authentication can use the ______ block.

  • Aconnection (correct answer)
  • Bcredentials
  • Csecrets
  • Dssh
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: connection

Topic 1 Β· Question 88

Terraform validate reports syntax check errors from which of the following scenarios?

  • ACode contains tabs indentation instead of spaces
  • BThere is missing value for a variable (correct answer)
  • CThe state files does not match the current infrastructure
  • DNone of the above
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: There is missing value for a variable

Topic 1 Β· Question 89

Which of the following is allowed as a Terraform variable name?

  • Acount
  • Bname (correct answer)
  • Csource
  • Dversion
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: name

Topic 1 Β· Question 90

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

  • Afor_each
  • Brepeated
  • Cnesting
  • Ddynamic (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: dynamic

Topic 1 Β· Question 91

Module variable assignments are inherited from the parent module and do not need to be explicitly set.

  • ATrue
  • BFalse (correct answer)
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: False

Topic 1 Β· Question 92

If writing Terraform code that adheres to the Terraform style conventions, how would you properly indent each nesting level compared to the one above it?

  • AWith four spaces
  • BWith a tab
  • CWith three spaces
  • DWith two spaces (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: With two spaces

Topic 1 Β· Question 93

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

  • ACreate a sample main.tf file (correct answer)
  • BInitialize a configured backend
  • CRetrieve the source code for all referenced modules
  • DLoad required provider plugins
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Create a sample main.tf file

Topic 1 Β· Question 94

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

  • ATrue
  • BFalse (correct answer)
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: False

Topic 1 Β· Question 95

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

  • AOnly Terraform Cloud organization owners can set workspace variables on VCS connected workspaces
  • BCommit a change to the VCS working directory and branch that the Terraform Cloud workspace is connected to (correct answer)
  • COnly members of a VCS organization can open a pull request against repositories that are connected to Terraform Cloud workspaces
  • DOnly Terraform Cloud organization owners can approve plans in VCS connected workspaces
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Commit a change to the VCS working directory and branch that the Terraform Cloud workspace is connected to

Explanation

Terraform Cloud, now HCP Terraform, provides managed remote runs, state, collaboration, policy, and governance.

Topic 1 Β· Question 96

Terraform and Terraform providers must use the same major version number in a single configuration.

  • ATrue
  • BFalse (correct answer)
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: False

Topic 1 Β· Question 97

Which statement describes a goal of infrastructure as code?

  • AAn abstraction from vendor specific APIs
  • BWrite once, run anywhere
  • CA pipeline process to test and deliver software
  • DThe programmatic configuration of resources (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: The programmatic configuration of resources

Topic 1 Β· Question 98

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

  • AWhen a change is made to the resources via the Azure Cloud Console, the changes are recorded in a new state file
  • BWhen a change is made to the resources via the Azure Cloud Console, Terraform will update the state file to reflect them during the next plan or apply
  • CWhen a change is made to the resources via the Azure Cloud Console, the current state file will not be updated (correct answer)
  • DWhen a change is made to the resources via the Azure Cloud Console, the changes are recorded in the current state file
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: When a change is made to the resources via the Azure Cloud Console, the current state file will not be updated

Explanation

Terraform state maps resource addresses to remote objects and stores metadata needed to calculate changes efficiently.

Topic 1 Β· Question 99

You need to deploy resources into two different cloud regions in the same Terraform configuration. To do that, you declare multiple provider configurations as follows: What meta-argument do you need to configure in a resource block to deploy the resource to the `us-west-2` AWS region?

Exhibit 1 for question 99
  • Aalias = west
  • Bprovider = west
  • Cprovider = aws.west (correct answer)
  • Dalias = aws.west
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: provider = aws.west

Explanation

A provider plugin implements resource types and data sources that communicate with an external API.

Topic 1 Β· Question 100

You have declared an input variable called environment in your parent module. What must you do to pass the value to a child module in the configuration?

  • AAdd node_count = var.node_count
  • BDeclare the variable in a terraform.tfvars file
  • CDeclare a node_count input variable for child module (correct answer)
  • DNothing, child modules inherit variables of parent module
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Declare a node_count input variable for child module

Explanation

A Terraform module packages related resources into a reusable configuration with defined inputs and outputs. A child module is called by another module to reuse and encapsulate infrastructure configuration. An input variable parameterizes a module so callers can provide environment-specific values.

Topic 1 Β· Question 101

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

  • ATrue
  • BFalse (correct answer)
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: False

Topic 1 Β· Question 102

Which option cannot be used to keep secrets out of Terraform configuration files?

  • AEnvironment Variables
  • BMark the variable as sensitive (correct answer)
  • CA Terraform provider
  • DA -var flag
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Mark the variable as sensitive

Explanation

Marking a value sensitive redacts it from routine CLI output, though it can still be stored in state.

Showing questions 81–100 of 368 Β· Page 5 of 19