Which statement describes a configuration where a resource ID is declared more than once?

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 statement describes a configuration where a resource ID is declared more than once?

Explanation:
In Terraform, every resource must have a unique address within a module, defined by its type and local name. Terraform tracks resources by that address in the state, so declaring the same resource identifier more than once creates a conflict—the plan and apply will fail because two blocks would try to represent the same address. This is exactly what the statement describes: a configuration where a resource identifier is declared more than once. The idea that duplicates would be automatically deduplicated isn’t how Terraform works, and the other options aren’t related to resource address conflicts (local vs remote state and module version issues address different aspects of Terraform usage).

In Terraform, every resource must have a unique address within a module, defined by its type and local name. Terraform tracks resources by that address in the state, so declaring the same resource identifier more than once creates a conflict—the plan and apply will fail because two blocks would try to represent the same address. This is exactly what the statement describes: a configuration where a resource identifier is declared more than once.

The idea that duplicates would be automatically deduplicated isn’t how Terraform works, and the other options aren’t related to resource address conflicts (local vs remote state and module version issues address different aspects of Terraform usage).

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy