🔍

TA-003 — questions

Page 18 of 19 · 368 total questions.

Topic 1 · Question 349

When developing a Terraform module, how would you specify the version when publishing it to the official Terraform Registry?

  • ATerraform Registry does not support versioning modules.
  • BMention it on the module’s configuration page on the Terraform Registry
  • CTag a release in your module’s source control repository. (correct answer)
  • DConfigure it in the module’s Terraform code.
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: Tag a release in your module’s source control repository.

Explanation

A Terraform module packages related resources into a reusable configuration with defined inputs and outputs.

Topic 1 · Question 350 · Select all that apply

What functionality do providers offer in Terraform? (Choose three.)

  • AInteract with cloud provider APIs. (correct answer)
  • BProvision resources for on-premises infrastructure services. (correct answer)
  • CProvision resources for public cloud infrastructure services. (correct answer)
  • DGroup a collection of Terraform configuration files that map to a single state file.
  • EEnforce security and compliance policies.
Reveal answer & explanation
Correct answer: A, B, C

The correct answer is A, B, C. Option A: Interact with cloud provider APIs. Option B: Provision resources for on-premises infrastructure services. Option C: Provision resources for public cloud infrastructure services.

Explanation

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

Topic 1 · Question 351

It is _________ to change the Terraform backend from the default “local” backend to a different one after performing your first terraform apply.

  • Amandatory
  • Boptional (correct answer)
  • Cimpossible
  • Ddiscouraged
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: optional

Topic 1 · Question 352

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

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

The correct answer is B. Option B: False

Topic 2 · Question 353

Which command lets you experiment with Terraform expressions?

  • Aterraform console (correct answer)
  • Bterraform env
  • Cterraform validate
  • Dterraform test
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: terraform console

Explanation

terraform console evaluates Terraform expressions interactively using the current configuration and state.

Topic 2 · Question 354

You can install Community/Partner plugins using terraform init.

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

The correct answer is A. Option A: True

Topic 2 · Question 355 · Select all that apply

What functionality do providers offer in Terraform? (Choose three.)

  • AGroup a collection of Terraform configuration files that map to a single state file.
  • BProvision resources for public cloud infrastructure services. (correct answer)
  • CInteract with cloud provider APIs. (correct answer)
  • DEnforce security and compliance policies.
  • EProvision resources for on-premises infrastructure services. (correct answer)
Reveal answer & explanation
Correct answer: B, C, E

The correct answer is B, C, E. Option B: Provision resources for public cloud infrastructure services. Option C: Interact with cloud provider APIs. Option E: Provision resources for on-premises infrastructure services.

Explanation

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

Topic 2 · Question 356

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 2 · Question 357

A resource block is shown in the Exhibit space of this page. resource “aws_vpc” “main” { name = “test” } What is the provider for this resource?

  • Amain
  • Bvpc
  • Caws (correct answer)
  • Dtest
Reveal answer & explanation
Correct answer: C

The correct answer is C. Option C: aws

Topic 2 · Question 358

Terraform providers are always installed from the internet.

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

The correct answer is B. Option B: False

Topic 2 · Question 359

You need to determine from which paths Terraform is loading the providers referenced in your *.tf files. How can you enable additional logging to see this information?

  • ASet the environment variable TF_VAR_log=TRACE.
  • BSet the environment variable TF_LOG=TRACE. (correct answer)
  • CSet the environment variable TF_LOG=PATH.
  • DSet verbose logging for each provider in your Terraform configuration.
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Set the environment variable TF_LOG=TRACE.

Topic 2 · Question 360

Which of these is stored in the .terraform directory?

  • AProviders and modules (correct answer)
  • BLock file
  • CState file
  • DConfiguration files
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: Providers and modules

Explanation

A provider plugin implements resource types and data sources that communicate with an external API. A Terraform module packages related resources into a reusable configuration with defined inputs and outputs.

Topic 2 · Question 361

Where can Terraform not load a provider from?

  • AProvider plugin cache
  • BSource code (correct answer)
  • COfficial HashiCorp distribution on releases.hashicorp.com
  • DPlugins directory
Reveal answer & explanation
Correct answer: B

The correct answer is B. Option B: Source code

Topic 3 · Question 362

Which command must you run before you run a plan or apply for the first time?

  • Aterraform validate
  • Bterraform workspace
  • Cterraform import
  • Dterraform init (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: terraform init

Explanation

terraform init initializes a working directory, installs required providers and modules, and configures the backend.

Topic 3 · Question 363

You modified your local Terraform configuration and ran 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.

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

The correct answer is B. Option B: False

Topic 3 · Question 364

Which syntax check returns an error when you run terraform validate?

  • ANone of these will return an error.
  • BThere is a missing variable block. (correct answer)
  • CThe state file does not match the current infrastructure.
  • DThe code contains tabs for indentation instead of spaces.
Reveal answer & explanation
Correct answer: B

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

Topic 4 · Question 365

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

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

The correct answer is A. Option A: True

Topic 4 · Question 366

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?

  • ACount arguments
  • BCollection functions
  • CLocal values
  • DDynamic blocks (correct answer)
Reveal answer & explanation
Correct answer: D

The correct answer is D. Option D: Dynamic blocks

Explanation

A dynamic block programmatically generates repeatable nested blocks from a collection.

Topic 4 · Question 367

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?

  • Avariable “billing_dept” {default = “”} (correct answer)
  • Bvariable “billing_dept” {type = optional(string)}
  • Cvariable “billing_dept” {optional = true}
  • Dvariable “billing_dept” {type = default}
Reveal answer & explanation
Correct answer: A

The correct answer is A. Option A: variable “billing_dept” {default = “”}

Topic 5 · Question 368

When you run terraform apply, the Terraform CLI will print output values from both the root module and any child modules.

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

The correct answer is B. Option B: False

Showing questions 341360 of 368 · Page 18 of 19