> For the complete documentation index, see [llms.txt](https://docs.infraglide.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.infraglide.com/terraform-iac-engine/code-panel.md).

# Code Panel & File Splitting

The designer **Config** tab is InfraGlide's code panel: a read-only view of the generated Terraform configuration for the current pipeline.

***

### Opening the Code Panel

![alt text](/files/7x9Fest0hUWOStdQxEWZ)

1. Open a pipeline in the designer.
2. Select the **Config** view tab (alongside **Canvas** and **Executions**) in the center view switcher.
3. The panel header reads: **Terraform Configuration**.

While Config is open, InfraGlide automatically updates the code preview as you make and save changes on the canvas graph.

> **Note:** The Config tab label shows a spinner (⟳) while generation is in progress. Wait for it to clear before copying or importing.

***

### What You Can Do

| Feature / Action              | Description                                                           |
| ----------------------------- | --------------------------------------------------------------------- |
| **Inspect Generated Code**    | Full syntax-highlighted view of the generated Terraform configuration |
| **Copy Code**                 | One-click copy of generated configuration to clipboard                |
| **Import JSON**               | Bring external Terraform JSON directly into the visual designer       |
| **Real-time Synchronization** | Automatic debounced code updates as canvas changes are saved          |

***

### File Layout Architecture

Canvas generation produces clean, enterprise-ready Infrastructure as Code configuration containing provider settings, variable declarations, cloud resource definitions, and module linkages.

Related runtime artifacts in the pipeline execution environment include provider lockfiles, versioned state tracking, and execution plan artifacts.

***

### Import Paths Adjacent to the Panel

![alt text](/files/KeHQGDUUnLSQQE1BsgVX)

* Designer pipeline menu → **Import Terraform JSON** (also accepts HCL paste in the import modal).
* **Template Converter** page for broader format conversion to Terraform JSON.
* Deployed Resources → **Create pipeline** for inventory-backed imports.

***

### Environment Switcher

The designer toolbar includes an **Environment Switcher** control adjacent to the main action buttons. This allows selecting the target deployment environment context. The Config panel regenerates against the currently selected environment's saved pipeline state.

### ![alt text](/files/XoESvHYqIJisJr3XpbDV)

### See also

* [Real-Time Terraform Code Generation](/terraform-iac-engine/code-generation.md)
* [Designer Interface Overview](/visual-canvas-and-pipeline-designer/interface-overview.md)
* [State File & Backend Management](/terraform-iac-engine/state-management.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.infraglide.com/terraform-iac-engine/code-panel.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
