Documentation

esc
    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?

    TerraformAn AI app (Claude, ChatGPT, Cursor…)
    Good forProduction and staging, team setups, anything you rebuildQuestions, checking status, small changes, trying things out
    How you workWrite .tf files, review them, run terraform applyAsk in plain words: "make me a small Ubuntu server"
    RepeatableYes: the same files give the same resultNo: each chat is one-off
    ReviewableYes: changes go through git and code reviewYou approve each costly or destructive step in the chat
    Remembers what it madeYes, in its state fileNo
    Signs in withAn API key from Organization › API keysIts 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.

    text
    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 .tf files, not in a chat.
    • If an AI app did change something by mistake, run terraform plan to see the difference. Then either put the change into your files, or run terraform apply to 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.

    Was this page helpful?

    Updated