Skip to main content

maf-sandbox-terraform

PyPI Python License

Experimental. This package warns on import with MafSandboxTerraformExperimentalWarning. Releases before 1.0 may change or remove APIs without notice.

Offline configuration validation for Terraform and OpenTofu, as a sibling of maf-sandbox-bicep. Not yet released; run from this workspace until the first package release.

The host calls make_terraform_tools(router, file_store, agent_id, context, engine="terraform", image=...). The accepted engine options are exactly terraform (default) and opentofu. They attach terraform_validate and opentofu_validate, respectively, with separate sandbox kinds. Each tool accepts files: list[str] and root_module: str = ".". No engine fallback or model-selected CLI flags are supported.

The tool stages the explicit manifest, runs init -backend=false -input=false -no-color, validate -json, and fmt -check -recursive -no-color, and returns separate validation and formatting verdicts. Initialization failure means validation is incomplete. Malformed or inconsistent reports never produce a pass. A supplied root .terraform.lock.hcl adds -lockfile=readonly; otherwise initialization may create a lock only inside that call's disposable guest. No files are written back to the store, and no formatted text is returned. The tool description and the fixed guidance say so, so a model fixes formatting by editing the files.

Include every configuration sibling in each selected directory, every local module, and referenced text assets. Select a root module containing at least one recognized configuration file. Relative paths preserve local references such as ../modules/child; uploads cannot contain .. segments. Terraform accepts .tf and .tf.json; OpenTofu also accepts .tofu and .tofu.json, with its native precedence. Terraform mode refuses .tofu files rather than silently validating an empty directory. The listing completeness check covers only files the host shares with this tool.

State, plans, variable files, CLI credential/configuration paths, plugin binaries, and reserved directories are refused. Files must be text and fit the core transfer limits (64 files, 8 MiB per file, 32 MiB total). Reads retain the listing's provenance and all reads and writes must succeed before execution begins. Guest results carry untrusted source integrity; fixed standing guidance is a separate item. When argument names contain hidden content, diagnostic prose and locations are withheld.

The spec requires POSIX, container isolation or stronger, closed egress, call isolation, and disposal. The host may configure a stronger router. The guest launcher clears inherited environment variables, uses a fixed filesystem provider mirror without a direct-install fallback, bounds combined CLI output to 128 KiB, and shares one deadline across CLI phases. exec_timeout_seconds defaults to 120 and accepts finite values in (0, 600]. Host execution allows an additional five seconds for transport and process cleanup. Cancellation waits for that bounded execution before core-owned disposal.

Provider validation executes native provider code. Expressions can read other guest files. Directory staging is not a confinement boundary: use a dedicated immutable image containing no credentials, host mounts, or sensitive content. This package does not support warm reuse, online dependency resolution, variable-dependent initialization, plan, apply, destroy, import, state commands, tests, or policy/security linting. A valid configuration does not establish that a deployment will succeed.

Build instructions, platform and dependency pins, and a runnable checkout example are in the image README. Python wheels contain no engine or provider binaries. The initial measured guest platform is Linux amd64 on Docker; ACAS and WSLC have not been verified for this workload. The kind guide describes the evidence and remaining work.

Release files for maf-sandbox-terraform 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for maf-sandbox-terraform 0.1.1
File Size Uploaded
maf_sandbox_terraform-0.1.1.tar.gz 10.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for maf-sandbox-terraform 0.1.1
File Interpreter ABI Platform
maf_sandbox_terraform-0.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 22.8 kB

Release files / maf_sandbox_terraform-0.1.1.tar.gz

Download URL maf_sandbox_terraform-0.1.1.tar.gz
Size 10.1 kB
Tags Source
SHA-256 checksum
How to use checksums
641c4a4b65a53abe20aab62134a5da7af6294f01651f3ce2da64d22e0608574e
BLAKE2b-256 checksum
How to use checksums
2de5629ed9061a349ba9d43ebd04111d72ee4d22c5e4e3fc8a8292124707710a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.

Transparency log

Release files / maf_sandbox_terraform-0.1.1-py3-none-any.whl

Download URL maf_sandbox_terraform-0.1.1-py3-none-any.whl
Size 12.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
022dc315f84a291358868fd7b3f4682b41fb4844d9ec94051eabec497ba0da08
BLAKE2b-256 checksum
How to use checksums
3b303e4249a5c427ce2041b529fc3ce7778e1d1c17f125406e2e802a4edd2e95
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 17, 2026.

Transparency log

Release history Release notifications | RSS feed

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page