Skip to main content

Terraform

@webframp/terraformv2026.04.22.2· 1mo 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
02Models1
@webframp/terraformv2026.04.14.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
03Previous Versions2
2026.04.22.1Apr 22, 2026
2026.04.14.1Apr 15, 2026
04Stats
A
100 / 100
Downloads
19
Archive size
8.4 KB
  • Has README or module doc2/2earned
  • README has a code example1/1earned
  • README is substantive1/1earned
  • Most symbols documented1/1earned
  • No slow types1/1earned
  • Has description1/1earned
  • Platform support declared (or universal)2/2earned
  • License declared1/1earned
  • Verified public repository2/2earned
05Platforms
06Labels