Terraform was developed by Hashicorp and works on the principles of Infrastructure as Code (IaC). IBM uses Terraform as the default IaC-based automation engine in its product. For more information, refer to the Terraform on IBM Cloud documentation.
Blast Radius is an open-source tool used for reasoning about Terraform dependency graphs with an interactive view. You can use Blast Radius to do the following:
IBM has enhanced the capabilities in Blast Radius to view the IBM Cloud Terraform configuration files, Terraform plan files and the Terraform state files (with additional details like cost estimate, time estimate and policy compliance for each resource in the graphical view).
Install latest release of the Blast Radius wheel from the IBM Cloud repository via this command:
pip3 install blastradius-0.1.25.1-py3-none-any.whl
Verify the Blast Radius installation:
blast-radius help
The output should look something like this:
Follow these steps to run Blast Radius in your local system with a sample Terraform configuration:
The rows represent nodes, and they have on-click functionalities. The first row depicts the dependent path of the node, as shown in Figure 3:
When you on-click the plan row, you will get the plan data of the particular resource in the side panel, as shown in Figure 4:
Similarly, you can view the cost and policy information of the resources in the respective view, but for that, you need to have cost data and policy data in the form of cost.json and policy.json in the directory. You can also filter the graph based on their nodes:
You can also pure the graph to minimize its view and visualize it in a wider and clearer view. To do so, you need to select the node and click on the purge symbol. The view will be something like what is shown in Figure 6:
There are other features like zoom in and zoom out, and you can also download an .svg file of your graph.
In this post, you learned how you can use Blast Radius to simplify Terraform resources and data source visualization.
To explore more about Blast Radius and to contribute, use the Blast Radius repository.