Atelier: Comparing module versions before you upgrade

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:

  1. Re-clones the module from the remote at the new ref.
  2. 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 [!].
  3. Runs terraform init -upgrade on the next plan so Terraform re-fetches the module source at the new ref.
  4. 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

  1. Open your wrapper in Atelier.
  2. Press P to plan at the current version. Review the baseline.
  3. Press R, type the new ref, confirm.
  4. Fill in any new required variables the upgrade introduced.
  5. Press P again. Read the infrastructure diff.
  6. Press S to check current state if you need context.
  7. Press A to apply when youโ€™re satisfied, or Q to 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.

3 Likes