# OpenCLI Agent Pack: Terraform

Use this when an AI agent needs to work with `terraform`.

## What this CLI is for
The official CLI from HashiCorp. Infrastructure as code, plans, and provisioning from the terminal. Start with `terraform init` and go from there. Supports structured output — good for scripts and agents.

Best for: infrastructure as code, plans, and provisioning from the terminal.

## Agent readiness
Great for agents (75/100)
- Structured output is available for parsing.
- Supports non-interactive/scripted use.
- Works well in CI or repeatable automation.

## Install
```sh
brew tap hashicorp/tap && brew install hashicorp/tap/terraform
```

## Verify before real work
```sh
terraform version
```
Expected signal: Responds and is ready to inspect or plan.

## Safe starting commands
```sh
terraform version
```

```sh
terraform init && terraform plan
```

```sh
terraform init
```

```sh
terraform plan
```

```sh
terraform apply
```

## Guardrails for agents
- Network access is required; avoid leaking secrets in logs.
- Require confirmation before apply, delete, deploy, transfer, merge, or write actions.

## Suggested agent instruction
You may use Terraform (`terraform`) for infrastructure as code, plans, and provisioning from the terminal.. First install it if missing, then run the verify command. Start with read-only or inspection commands. Summarize what you found before changing anything. Ask for confirmation before commands that mutate remote state, spend money, deploy, delete data, merge code, or expose secrets.

Source: OpenCLI
