AI / Terraform or AI app
Terraform or an AI app?
When to describe your infrastructure in Terraform, when to ask an AI app, and how to use both without them getting in each other's way.
Terraform and AI apps both manage the same Pantech resources, but they suit different work. Terraform is for infrastructure you keep and want to repeat. An AI app is for questions and quick tasks, by chat.
Which should I use?
| Terraform | An AI app (Claude, ChatGPT, Cursor…) | |
|---|---|---|
| Good for | Production and staging, team setups, anything you rebuild | Questions, checking status, small changes, trying things out |
| How you work | Write .tf files, review them, run terraform apply | Ask in plain words: "make me a small Ubuntu server" |
| Repeatable | Yes: the same files give the same result | No: each chat is one-off |
| Reviewable | Yes: changes go through git and code review | You approve each costly or destructive step in the chat |
| Remembers what it made | Yes, in its state file | No |
| Signs in with | An API key from Organization › API keys | Its own connection from Organization › AI apps |
If you would want to rebuild it tomorrow, put it in Terraform. If you just want an answer or a quick change, ask an AI app.
Use them together
The safest way to combine them is to let the AI app write Terraform and let you apply it.
Write the Terraform for two small Ubuntu servers in a new
private network, with port 443 open, using the pantechdynamics provider.Read what it writes, then run terraform plan and terraform apply yourself. Nothing changes until you do.
Don't let both change the same things
Terraform expects to be the only thing changing what it manages. If an AI app resizes, renames or deletes a server that Terraform created, the next terraform plan shows the difference and terraform apply puts it back, or fails.
- Connect AI apps that look at Terraform-managed resources with Read only access. They can still answer questions and spot problems. See Access levels.
- Make changes to those resources in your
.tffiles, not in a chat. - If an AI app did change something by mistake, run
terraform planto see the difference. Then either put the change into your files, or runterraform applyto undo it. - Keep Manage and delete for AI apps that only work on resources Terraform does not manage.
They are separate on purpose
Terraform uses an ordinary API key. AI apps each get their own connection. So:
- Turning AI apps off for the organization never stops Terraform. See Turn AI apps off for the organization.
- Disconnecting an AI app never touches your Terraform key.
- Every request is recorded against the key that made it, so Terraform's changes can always be told apart from an AI app's.