Export to infrastructure-as-code
Turn a single resource or a whole plan into Terraform, Pulumi, YAML, or JSON you can commit to a repo or hand to another tool.
Everything you build with emma is real, portable infrastructure. This guide shows how to export it as infrastructure-as-code — so you can commit it, review it, or run it through your own pipeline. There's no lock-in: the prompt is a faster way to author, not a place your infrastructure gets trapped.
Before you start you need something to export — a resource emma manages, or a plan you've just generated. Any resource on the diagram qualifies.
1. Ask emma to export
Point emma at what you want and name the format. You can export one resource or a whole plan.
Try this — Export the web-prod VM as Terraform
emma generates the code inline in the chat, ready to copy.
2. Choose a format
emma supports four output formats — ask for whichever fits your workflow:
| Format | Good for |
|---|---|
Terraform (.tf) | HCL pipelines, existing Terraform state |
| Pulumi (TypeScript) | Teams who prefer real code |
| YAML | Declarative configs, GitOps |
| JSON | Programmatic consumption |
Try this — Give me that as Pulumi instead
3. Export a whole plan
You're not limited to one resource. Ask emma to export everything in a plan — the app you just deployed, say — and you get a single set of files describing the lot.
Try this — Export my whole Frankfurt environment as Terraform
4. Run it
The exported Terraform uses emma's own Terraform provider, so you manage the same resources as code.
emma includes the usage steps with the export: create a Service Application (Settings → Service
Applications) for a client_id / client_secret, save the file as main.tf with a
terraform.auto.tfvars, then run terraform init / plan / apply. You get real infrastructure-as-code —
version control, review, and CI — for everything you built by chatting.
The resources themselves live in your own cloud accounts; the exported config provisions and manages them through emma's provider (YAML, Pulumi, and JSON exports are available too).
What's next
- Infrastructure-as-Prompt — where export fits in the model
- Deploy an app by chatting — build something to export
- Import existing infrastructure — the reverse direction
Last updated on 17 Jul 2026