Skip to main content
In this lesson we move beyond creating individual Terraform resources and focus on how Terraform connects them and shares information between them. Understanding these concepts helps you build reliable, maintainable infrastructure-as-code that scales. We’ll cover four core topics:
  • How resource attributes work, and how values produced by one resource can be referenced by another.
  • Resource dependencies: how Terraform infers them automatically, and when you must declare dependencies explicitly.
  • Resource targeting: what it does and why it should be used sparingly.
  • How to define and use output variables to expose important values from our Terraform configuration.
The image shows an agenda with four points related to Terraform, including understanding resource attributes, managing dependencies, using targeting, and defining output variables.
This lesson explains how Terraform passes data between resources, controls the order of operations, and surfaces useful values through outputs. These are essential for composing modules, integrating with other tools, and debugging your plans.

What you’ll learn (quick overview)

Resource targeting (using -target) can break dependency graphs and lead to drift. Only use targeting for troubleshooting or carefully planned changes.

Watch Video