Terraform
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/repo2026.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.
Global Arguments
| Argument | Type | Description |
|---|---|---|
| workDir | string | Path to the initialized Terraform/OpenTofu working directory |
| workspace | string | Terraform workspace name |
| binary | string | CLI binary to use: 'terraform' or 'tofu' |
Resources
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.
- 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