nerdexam
HashiCorp

TA-002-P · Question #176

Multiple providers can be declared within a single Terraform configuration file.

The correct answer is A. True. This is True. Terraform supports declaring multiple providers within a single configuration file (or across files in the same root module). For example, you can declare both an aws provider and an azurerm provider in the same .tf file to manage resources across multiple clouds si

Understand Terraform basics

Question

Multiple providers can be declared within a single Terraform configuration file.

Options

  • ATrue
  • BFalse

How the community answered

(34 responses)
  • A
    94% (32)
  • B
    6% (2)

Explanation

This is True. Terraform supports declaring multiple providers within a single configuration file (or across files in the same root module). For example, you can declare both an aws provider and an azurerm provider in the same .tf file to manage resources across multiple clouds simultaneously. You can also declare multiple instances of the same provider using aliases (e.g., two AWS providers for different regions). This is a core feature enabling multi-cloud and multi-region architectures within a single Terraform configuration.

Topics

#Terraform providers#Provider configuration#Configuration structure#Multiple providers

Community Discussion

No community discussion yet for this question.

Full TA-002-P Practice