Which configuration approach allows Terraform to manage resources across more than one provider?

Prepare for the HashiCorp Terraform Associate Exam with quizzes, flashcards, and multiple-choice questions. Each question includes hints and explanations. Boost your confidence and ace your exam!

Multiple Choice

Which configuration approach allows Terraform to manage resources across more than one provider?

Explanation:
Terraform can manage resources from different providers within a single configuration by defining multiple provider blocks and giving each one an alias. This lets you target distinct destinations (different regions, clouds, or accounts) in one workspace. You declare each provider with its own configuration and an alias, then attach resources to the correct provider by referencing that alias (for example, provider = aws.east or provider = azurerm.west). Modules can also receive a specific aliased provider via the providers meta-argument, ensuring nested resources use the intended credentials. This approach enables coordinated, cross-provider infrastructure inside one configuration rather than splitting things into separate files or runs.

Terraform can manage resources from different providers within a single configuration by defining multiple provider blocks and giving each one an alias. This lets you target distinct destinations (different regions, clouds, or accounts) in one workspace. You declare each provider with its own configuration and an alias, then attach resources to the correct provider by referencing that alias (for example, provider = aws.east or provider = azurerm.west). Modules can also receive a specific aliased provider via the providers meta-argument, ensuring nested resources use the intended credentials. This approach enables coordinated, cross-provider infrastructure inside one configuration rather than splitting things into separate files or runs.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy