What is Terraform?
Terraform is a free and open-source infrastructure as code (IAC) that can help to automate the deployment, configuration, and management of remote servers. Terraform can manage both existing service providers and custom in-house solutions.
Read more about Terraform here
To generate the graph of your infrastructure you can use terraform graph command.
Note:- The terraform graph command is used to generate a visual representation of either a configuration or execution plan. The output is in the DOT format, which can be used by GraphViz to generate charts.