Terraform

CLIterraformfirst-party MCP server

An agent with terraform on its PATH can apply infrastructure changes. Memnox wraps the binary, reads the command before it runs, and matches it against the table below. Nothing here is a list of what we support: it is what the runtime already classifies, and the strings are the ones a rule matches on.

What it reads to authenticate

Discovery records that these exist and hashes them. It never reads a value, so a scan can say three agents reach this file and never what is inside it.

! ~/.terraform.d/credentials.tfrc.json

What it cannot undo

2

Every one of these carries the alternative a refusal names, which is why an agent takes the alternative and finishes the task instead of stopping.

terraform destroy **terraform.destroy
Denied, it names terraform plan -destroy, and read it instead.
terraform state rm **terraform.state-rm
the resource survives and is forgotten

What it changes

2

Allowed by default, and the obvious first thing to put behind ask.

terraform apply **terraform.apply
Denied, it names terraform plan instead.
terraform import **terraform.import

What it only reads

2

Matched so a rule can say read is fine, rather than leaving it unspoken.

terraform plan **terraform.plan
terraform show **terraform.show

The rule this writes

[[rules]]
name = "terraform-destructive-asks-first"
match.actions = ["terraform.destroy"]
decision.effect = "ask"
decision.reason = "This cannot be undone."

memnox protect --for terraform writes this into memnox.policies.toml from the table above. You can edit it, and the file is yours.

Run npx memnox to find out whether Terraform is actually reachable from your machine. It reads your own disk and needs no account.