Redrawn on every apply
A change to the infrastructure changes the picture, with no extra CI job and no agent.
How the provider works (opens in a new tab)Features //
Docs //
The Terraform and OpenTofu provider makes your diagram part of the configuration, so each apply redraws it.
Works withTerraformOpenTofuPulumi, through the providerLatest release: 0.1.0
A Terraform module gets one more file: the Plotwork provider, a plotwork_import data source that reads the module's own .tf files, and a plotwork_diagram resource with a stable link. It works with Terraform and OpenTofu.
Pin the provider, set an API key, and apply. The diagram link is an output like any other.
terraform { required_providers { plotwork = { source = "plotwork-official/plotwork" version = "~> 0.1" } }}provider "plotwork" {} # reads PLOTWORK_API_KEY# Draw this module's Terraform.data "plotwork_import" "network" { format = "terraform" files = { for f in fileset(path.module, "*.tf") : f => file("${path.module}/${f}") }}# Publish it with a link that never changes.resource "plotwork_diagram" "network" { source = data.plotwork_import.network.source name = "Production network" alias = "prod-network"}output "diagram" { value = plotwork_diagram.network.stable_url}export PLOTWORK_API_KEY="pw_..."terraform init && terraform applyA change to the infrastructure changes the picture, with no extra CI job and no agent.
How the provider works (opens in a new tab)The HCP Terraform run task draws each plan into your library, every change marked in its colour.
Set up the run task (opens in a new tab)plotwork_render hands back the SVG for S3, Azure Blob Storage, Cloud Storage or a local file.
Draw into your own storage (opens in a new tab)Fill a diagram template with the CIDRs, endpoints and DNS names only the apply knows.
Draw live values (opens in a new tab)Set the organisation's colours, icons and approved patterns in the same apply that redraws its diagrams.
Organisations in Terraform (opens in a new tab)Upload organisation icons from a file, an S3 or Azure blob, or an https address on a CDN.
Host icons for Terraform (opens in a new tab)TypeScript and Python stacks run this provider through Pulumi's Any Terraform Provider, not a native package.
Use it from Pulumi (opens in a new tab)The provider runs the engine the MCP server runs, so what an agent drafts is what apply publishes.
import_sourceRequest{"format": "terraform","text": "<main.tf, 51 lines>"}Response{"ok": true,"coverage": {"line": "Drawn 8 of 8 resources.","complete": true},"diagnostics": [],"validation": { "valid": true }}
Works withClaude CodeCursorVS CodeCodexWindsurfGemini CLIand any MCP client
What platform and security teams ask before a provider joins their pipelines.
Start with the quick start, or run one of the ten examples with your own key.