Skip to main content

Terraform

@webframp/terraformv2026.07.18.1· 9d agoMODELS
01README

Read Terraform and OpenTofu state via CLI and marshal into swamp data.

Shells out to terraform show -json (or tofu show -json) to read state from any configured backend, then writes swamp resources keyed by Terraform resource address for CEL consumption in workflows and reports.

Supports workspace selection and binary switching between Terraform and OpenTofu via global arguments.

Quick Start

swamp extension pull @webframp/terraform
swamp model create @webframp/terraform tf-infra \
  --global-arg workDir=/path/to/terraform/repo
02Release Notes

2026.07.18.1

Added: An upgrades array entry (no-op) to terraform.ts for proper typeVersion tracking on existing instances. No schema or behavior changes.

2026.07.16.1

Changed: README and LICENSE reformatted (deno fmt) in PR #134; this is the first version bump to publish that formatting to the registry. No functional or behavioral change.

03Models1
@webframp/terraformv2026.07.18.1terraform/terraform.ts

Global Arguments

ArgumentTypeDescription
workDirstringPath to the initialized Terraform/OpenTofu working directory
workspacestringTerraform workspace name
binarystringCLI binary to use: 'terraform' or 'tofu'
fn list_resources()
List all resources in Terraform state with address, type, provider, and module path
fn read_state()
Read full Terraform state — writes one resource per Terraform resource keyed by address
fn get_outputs()
Read Terraform outputs — writes a summary resource plus one resource per output

Resources

tf_inventory(1h)— Summary of all Terraform-managed resources
tf_resource(1h)— Individual Terraform resource with full attribute values
tf_output(1h)— Terraform output value
04Previous Versions6
2026.07.16.1

2026.07.16.1

Changed: README and LICENSE reformatted (deno fmt) in PR #134; this is the first version bump to publish that formatting to the registry. No functional or behavioral change.

2026.06.21.1
2026.06.15.1
2026.04.22.2
2026.04.22.1
2026.04.14.1
05Stats
A
100 / 100
Downloads
71
Archive size
10.1 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types (deprecated)1/1earned
  • Dependencies pass trust audit2/2earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License declared1/1earned
  • Verified public repository2/2earned
06Platforms
07Labels