In Terraform 0.13 and above, outside of the required_providers block, Terraform configurations always refer to providers by their local names.

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

In Terraform 0.13 and above, outside of the required_providers block, Terraform configurations always refer to providers by their local names.

Explanation:
In Terraform 0.13 and later, how you reference a provider in resource and data blocks is determined by the local name of your provider configuration. The required_providers block is used to declare where a provider comes from and what version to constrain, but it doesn’t change the way you reference providers in the rest of the configuration. You refer to a provider by the local name defined in its provider configuration, such as aws for the default configuration or aws.east (where east is an alias) for an aliased configuration. This keeps provider usage explicit and tied to the particular configuration you’ve declared, even when multiple configurations of the same provider are in use. So the statement that outside the required_providers block Terraform configurations always refer to providers by their local names is the correct understanding.

In Terraform 0.13 and later, how you reference a provider in resource and data blocks is determined by the local name of your provider configuration. The required_providers block is used to declare where a provider comes from and what version to constrain, but it doesn’t change the way you reference providers in the rest of the configuration. You refer to a provider by the local name defined in its provider configuration, such as aws for the default configuration or aws.east (where east is an alias) for an aliased configuration. This keeps provider usage explicit and tied to the particular configuration you’ve declared, even when multiple configurations of the same provider are in use. So the statement that outside the required_providers block Terraform configurations always refer to providers by their local names is the correct understanding.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy