func WriteGraph(writer io.Writer, graph *tfgraph.Graph, options *RenderingOptions) {
	outputGraph := gographviz.NewGraph()
	outputGraph.Name = escape(options.GraphName)
	outputGraph.Directed = true
	_ = outputGraph.AddAttr(outputGraph.Name, string(gographviz.NewRank), "true")
	_ = outputGraph.AddAttr(outputGraph.Name, string(gographviz.Compound), "true")
	_ = outputGraph.AddAttr(outputGraph.Name, string(gographviz.RankDir), "TB")
	createCluster(outputGraph, "", graph.Root, options)
	for _, dep := range graph.Dependencies {
		shape, style := getEdgeShapeAndStyle(dep)
		_ = outputGraph.AddEdge(
			escape(dep.Source.GetQualifiedName()),
			escape(dep.Destination.GetQualifiedName()),
			true,
			map[string]string{
				string(gographviz.Shape): escape(shape),
				string(gographviz.Style): escape(style),
			},
		)
	}
	_, _ = io.WriteString(writer, outputGraph.String())
}
WriteGraph writes the specified Terraform graph in Graphviz Dot format.
package graphviz
import (
	"github.com/awalterschulze/gographviz"
	"github.com/pcasteran/terraform-graph-beautifier/tfgraph"
	"io"
)
const clusterRefNodeName = "clusterRef"
type RenderingOptions struct {
	GraphName    string
	EmbedModules bool
}