generate_interactive_html
Render a self-contained interactive HTML diagram from Terraform code so users can click, search, and explore cloud architecture offline without a server.
Instructions
Render a self-contained interactive HTML diagram for a human to open.
The page embeds the diagram, every resource's metadata and its own JavaScript, so it works offline with no server. Nodes are clickable and searchable. Produce this when someone wants to explore an architecture themselves rather than read a static picture. Needs Terraform code; for a JSON graph use render_graph with format "svg".
Returns {"path", "provider"} pointing at the generated .html file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | No | Heading shown on the page. Overrides a title in the annotation file. | |
| source | Yes | Terraform directory, Git URL, or tfdata.json replay file. Add //folder to a Git URL for a folder inside the repository, e.g. "https://github.com/org/repo//examples". A repository whose root is a reusable module plans no resources: draw a folder that uses it instead (examples/, an environment). | |
| outfile | No | Output file name without extension, e.g. "three_tier". Files always go to the server's output folder; from a path, only the last part is used. The cloud provider is appended. | architecture |
| upgrade | No | Run `terraform init -upgrade` to refresh modules. | |
| varfile | No | Paths to .tfvars files; different var files can produce different architectures from the same code. | |
| annotate | No | Path to a terravision.yml annotation file. | |
| fontsize | No | Label font size in points. | |
| iconsize | No | Icon size in pixels. | |
| planfile | No | Path to an existing plan JSON (terraform show -json). With graphfile, Terraform is never run and no cloud credentials are needed. | |
| graphfile | No | Path to an existing `terraform graph` DOT file. | |
| workspace | No | Terraform workspace to select. | default |
| simplified | No | Drop networking containers (VPCs, subnets, security groups) and show only the services. | |
| use_tf_names | No | Label nodes with full Terraform resource names. | |
| use_resource_names | No | Label nodes with the deployed resource names from the plan. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |