-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Terraform Cookbook
By :
One of the interesting features of Terraform is the ability to generate a dependency graph of the resource dependencies declared in the Terraform configuration.
The visualization of the dependency graph is important to understand the dependencies of Terraform resources and the Terraform operations order.
In this recipe, we will see how to generate and visualize this dependency graph.
For this recipe, we need to use a third-party drawing generation tool called Graphviz, which is available for download at https://graphviz.gitlab.io/download/. You will need to download and install the package corresponding to your OS.
As an example, we will take the Terraform configuration available at https://github.com/PacktPublishing/Terraform-Cookbook-Second-Edition/tree/main/CHAP06/sampleApp.
To generate the dependency graph, perform the following steps: