Inspect changes when you modify a Terraform module, without leaving your terminal.
This document is part of a series about Atelier. If you are new to Atelier, start with Introducing Atelier.
Upgrading a Terraform module is one of those tasks that sounds simple until youโre staring at a two-week-old terraform plan output in one terminal, a freshly-cloned copy of the new version in another, and trying to mentally diff the two. Which resources actually changed? Did the new version drop a variable you were relying on? Did it add required inputs you havenโt set yet?
Atelier gives you a structured answer to all of those questions from inside a single TUI session.
Plan at the current version
Before you switch anything, plan at the version youโre running now. Press P and Atelier runs terraform plan against your wrapper, building a collapsible tree of resource changes organised by module and resource type. The right pane shows per-attribute diffs: before and after values for every changed attribute, with unchanged attributes filtered out.
This is your baseline. You know what the current version of the module would do.
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ Module: cos_lite ยทunpinned โ 3 check warning(s) โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Plan: 47 to add, 0 to change, 0 to destroy.
โ 3 check warning(s): grafana.storage_directives is unset, so it will use the default 1G volume. Set a size โฆ
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎโญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โพ module.cos_lite โโ Select a resource row to see its attribute diff. โ
โ โธ juju_integration โโ โ
โ โธ juju_model โโ Use โ/โ to navigate, Enter to collapse/expand, Tab to focus this โ
โ โธ juju_offer โโ pane. โ
โ โธ terraform_data โโ โ
โ โพ module.cos_lite.module.alertmanager โโ โ
โ โธ juju_application โโ โ
โ โพ module.cos_lite.module.catalogue โโ โ
โ โธ juju_application โโ โ
โ โพ module.cos_lite.module.grafana โโ โ
โ โธ juju_application โโ โ
โ (1/21 0%) โโ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏโฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ [โ๏ธโ๏ธ] navigate [Enter] toggle [Tab] focus diff [P] re-plan [A] apply [W] warnings [Esc] back [?] help โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
Switch the ref
Press R and Atelier opens the ref switch modal. The module youโre targeting is context-aware: in a multi-module wrapper, R targets whichever module owns the variable your cursor is on, not always the primary one. The modal shows the current ref and a searchable list of available branches and tags from the remote.
Confirm with Enter and Atelier:
- Re-clones the module from the remote at the new ref.
- Carries your variable values forward, including wired HCL expressions like
model_uuid = data.juju_model.service_model.uuid. If a variable exists in both versions, your value comes with it. If a variable was present in the old ref but is missing in the new one, itโs flagged as orphaned and dropped. If the new ref introduced required variables you havenโt set, Atelier sets those as required with[!]. - Runs
terraform init -upgradeon the next plan so Terraform re-fetches the module source at the new ref. - Saves the wrapper with the updated source URL.
You donโt need to re-clone, re-init, or reconfigure anything manually.
The message provides context on what variable changes occurred:
Switched cos_lite to ref: track/2 (69a6621) ยท 4 orphaned: risk, model, postgresql_offer_url, ingress ยท 2 new: channel, model_uuid ยท 1 required model_uuid
Plan again and read the diff
Press P again. The plan that runs now targets the new version of the module with your existing values applied. The diff you see in the tree is the infrastructure delta between your current state and what the new module version would produce.
This is the upgrade comparison youโve been wanting: a single view that answers which resources changed, which ones are being replaced, and which ones are being destroyed, without requiring you to hold two separate workspaces in your head.
Toggle between diff and state
The plan view doesnโt stop at diffs. Press S to toggle between the plan diff view and the current state view. The state view shows the live attribute values of every managed resource, read directly from terraform.tfstate without invoking Terraform. This is useful for understanding context: before you read a diff, you might want to see what the resource actually looks like right now.
After a successful apply, the plan is consumed and the state view is shown automatically, since thereโs nothing left to diff against. On the next plan, the diff view returns.
The plan header always tells you where you stand:
Plan: 3 to add, 1 to change, 0 to destroy. | State: 54 resource(s) across 8 modules
The full workflow
- Open your wrapper in Atelier.
- Press
Pto plan at the current version. Review the baseline. - Press
R, type the new ref, confirm. - Fill in any new required variables the upgrade introduced.
- Press
Pagain. Read the infrastructure diff. - Press
Sto check current state if you need context. - Press
Ato apply when youโre satisfied, orQto quit and come back later.
Seven steps, zero context-switching between terminals.
Why this matters
Module upgrades are the most common source of Terraform drift surprises. A module you depend on might change defaults, rename variables, or introduce new resources. Without a structured way to compare, youโre left reading changelogs (if they exist) and hoping nothing catches you off guard.
Atelier makes the comparison mechanical: plan, switch, plan, read. The diff is always against your actual state, not a hypothetical. And because the wrapper carries your values forward through the switch, youโre comparing the module bump itself, not a side effect of missing configuration.