For a resource that uses a named provider configuration, which option shows the correct syntax to reference the named 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

For a resource that uses a named provider configuration, which option shows the correct syntax to reference the named provider?

Explanation:
When you configure multiple provider configurations with aliases, you tell Terraform which one to use by naming the provider with its type and alias, in the form <provider_type>.<alias>. For AWS with an alias of west, the resource should specify provider = aws.west. This directs Terraform to apply that specific provider configuration to the resource. The other patterns don’t correctly reference the named provider in the resource: they either place alias information in the wrong place, omit the provider type, or don’t form a valid provider reference.

When you configure multiple provider configurations with aliases, you tell Terraform which one to use by naming the provider with its type and alias, in the form .. For AWS with an alias of west, the resource should specify provider = aws.west. This directs Terraform to apply that specific provider configuration to the resource. The other patterns don’t correctly reference the named provider in the resource: they either place alias information in the wrong place, omit the provider type, or don’t form a valid provider reference.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy