In Terraform, a resource is uniquely identified in the state by which of the following?

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, a resource is uniquely identified in the state by which of the following?

Explanation:
Terraform tracks each managed resource in state using the resource address, which is built from the resource’s type and its local name within its module. This type-and-name pair uniquely identifies that resource in the state, because you can have many resources of the same type across different modules or configurations, but within a given module the combination of type and name is unique. The provider and region aren’t a unique key—you can deploy the same type in different regions or providers. The cloud resource ID is the remote identifier assigned after creation, not the key Terraform uses in state. The full address includes the module path, but the essential unique identifier within a module is the resource type together with its name.

Terraform tracks each managed resource in state using the resource address, which is built from the resource’s type and its local name within its module. This type-and-name pair uniquely identifies that resource in the state, because you can have many resources of the same type across different modules or configurations, but within a given module the combination of type and name is unique. The provider and region aren’t a unique key—you can deploy the same type in different regions or providers. The cloud resource ID is the remote identifier assigned after creation, not the key Terraform uses in state. The full address includes the module path, but the essential unique identifier within a module is the resource type together with its name.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy