Skip to main content

Graph Command

Generate a diagram directly from your terminal. pluralith graph creates a Terraform execution plan, draws a diagram and pushes it to the Pluralith dasboard. Headless export of diagrams as a PDF is also supported.

pluralith graph [flags]

Example

Here's a quick example on how to generate a diagram in any given terraform directory. Copy it to your terminal, hit enter and see the magic happen! The Pluralith dashboard should open and show the diagram.

pluralith graph --title "Mark I" --author "Tony Stark" --version "0.0.1" --show-changes

Available Flags

FlagDescriptionType
--local-onlyThe diagram will not be pushed to the Pluralith Dashboard. Instead, a PDF export of the Diagram gets generated locally and saved to disk

bool

--show-changesDetermines whether the exported diagram highlights changes made in the latest Terraform plan

bool

--show-driftDetermines whether the exported diagram highlights resource drift detected by Terraform

bool

--show-costsDetermines whether the exported diagram includes cost information (requires Infracost)

bool

--cost-modeDetermines which costs are shown. Can be delta or total (default delta)

string

--cost-periodDetermines over which period costs are aggregated. Can be hour or month (default month)

string

--cost-usage-filePath to an infracost usage file to be used for the cost breakdown

string

--file-nameThe name of the exported PDF

string

--out-dirThe directory the diagram should be exported to

string

--titleThe title of your diagram, will be displayed in the PDF output

string

--versionThe architecture version, will be displayed in the PDF output

string

--authorThe author of the diagram, will be displayed in the PDF output

string

--varA variable to pass to Terraform. Can be specified multiple times. (Format: --var='NAME=VALUE')

string

--var-filePath to a variable file to pass to Terraform. Can be specified multiple times.

string

--plan-filePath to an existing execution plan. (Generated with terraform plan -out plan.bin)

string

--plan-file-jsonPath to an existing JSON plan state. (Generated with terraform plan -out plan.bin and terraform show -json plan.bin > plan.json)

string

--config-filePath to a custom pluralith config file

string