Resource Addressing and Dependencies
Now that you have seen the backends supported by Terraform, you can delve deeper into resource addressing and how to set and handle resource dependencies while you manage them with the state file.
Resource Addressing
When you write Terraform configuration scripts, they primarily consist of multiple resources that will support the overall infrastructure you try to deploy. So, it becomes necessary to refer to a particular resource or a set of resources, manipulating or recreating them if there are any issues.
This is where resource addressing becomes vital, and any resource address will consist of two parts:
- The module path
- Resource specifications
Resource specifications may not always be needed. If you would like to refer to all the resources created by a particular module, specifying the module path will suffice. You can read about each one of them in detail now.
Module Path
If there are multiple modules within...