nerdexam
HashiCorp

TA-002-P · Question #5

A provider configuration block is required in every Terraform configuration. Example:

The correct answer is A. True. The marked answer is True, and for root modules this is effectively correct - Terraform needs provider configuration to know how to authenticate and communicate with an API. However, it is worth noting a nuance: child modules do not always require an explicit provider block becau

Understand Terraform basics

Question

A provider configuration block is required in every Terraform configuration. Example:

Options

  • ATrue
  • BFalse

How the community answered

(55 responses)
  • A
    95% (52)
  • B
    5% (3)

Explanation

The marked answer is True, and for root modules this is effectively correct - Terraform needs provider configuration to know how to authenticate and communicate with an API. However, it is worth noting a nuance: child modules do not always require an explicit provider block because they can inherit provider configurations passed down from the root module. For exam purposes, the answer is True because every Terraform configuration (especially at the root level) requires provider configuration to function.

Topics

#Providers#Configuration structure#Required blocks

Community Discussion

No community discussion yet for this question.

Full TA-002-P Practice