Here are all the actual test exam dumps for IT exams. Most people prepare for the actual exams with our test dumps to pass their exams. So it's critical to choose and actual test pdf to succeed.

Exam Terraform-Associate-004 Topic 6 Question 246 Discussion

Actual exam question for HashiCorp's Terraform-Associate-004 exam
Question #: 246
Topic #: 6
Exhibit:
provider " aws " { region = " us-east-1 " }
provider " aws " { region = " us-west-2 " }
You need to deploy resources into two different AWS regions in the same Terraform configuration using the provider blocks shown in the exhibit. What do you need to add to the provider configuration to deploy a resource to the us-west-2 AWS region?

Suggested Answer: A Vote an answer

Detailed Explanation:
* Rationale for Correct Answer: Terraform requires provider aliases when you configure the same provider multiple times in one configuration. You must define the second AWS provider with an alias, then explicitly tell the resource to use it with the provider meta-argument:
* provider " aws " {
* region = " us-east-1 "
* }
* provider " aws " {
* alias = " west "
* region = " us-west-2 "
* }
* resource " aws_instance " " example_us_west_2 " {
* provider = aws.west
* ami = data.aws_ami.ubuntu.id
* instance_type = " t3.micro "
* }
This is a core Terraform objective: selecting the correct provider configuration for a resource when multiple instances exist.
* Analysis of Incorrect Options (Distractors):
* B: Incorrect. Provider blocks do not support the syntax provider " aws " " west " { ... }. Aliasing is done with alias = " west " .
* C: Incorrect. You cannot invent a new provider type name like aws_west. The provider remains aws; you differentiate configurations via alias.
* D: Incorrect. Terraform will not automatically choose between multiple provider configurations for the same provider; you must disambiguate using aliases and provider = ....
* Key Concept: Provider aliases and the provider meta-argument for multi-region (or multi-account) deployments.
Reference: Manage Terraform Resources and Providers - configuring multiple provider instances using alias and selecting them with the provider meta-argument.

by Kerr at Apr 21, 2026, 08:15 PM

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Nick name: Submit Cancel
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.