Terraform Atlantis YAML Generator

Generate atlantis.yaml from a list of project directories. One default in this file means the pull request that changes a shared module shows no plan at all.

Paste below, or drop a file anywhere on this panel

Or drop a file anywhere on this panel. Nothing is uploaded: the analysis runs in this tab.

The answer appears here

Paste on the left and press Generate. Nothing leaves this tab.

Examples

Real input you can load into the tool above. Each one shows a different thing going wrong, because that is what the tool is for.

Two environments

The generated file names the module paths, because the default would not plan them

environments/prod
environments/staging

One directory, two workspaces

A project is a directory and a workspace together, and the workspace has to exist

infra prod
infra staging

The same project twice

Two plans against one state, serialised behind the same lock

environments/prod
environments/prod

Common mistakes

These are the ones that fail silently. The config is accepted, nothing raises an error, and the consequence arrives later.

  1. Leaving when_modified at its default with shared modules

    The paths are relative to the project directory, so a change to a module outside it triggers no plan. The pull request shows nothing and looks safe.

    Instead:List the module paths explicitly, then test it by changing a module and confirming a plan appears.

  2. Putting atlantis.yaml inside each project directory

    Atlantis reads one repo-level file, from the repository root. Copies elsewhere are ignored without complaint.

    Instead:Keep one atlantis.yaml at the root.

  3. Adding apply_requirements without checking the server config

    The server decides what a repository may override, and an unpermitted key makes Atlantis reject the entire file rather than that setting.

    Instead:Confirm the server-side repos.yaml allows it, or set the requirement server-side instead.

when_modified is relative to the project directory

The default is everything ending .tf beneath dir. A repository with environments/prod and a shared modules/ directory gets nothing when the module changes.

The silent case is the dangerous one

The pull request that alters a shared module produces no Terraform output, so it looks like a change with no infrastructure impact and gets approved on that basis. The change then applies on whatever runs next, in whichever environment happens to plan first. Add the module paths explicitly and confirm it works by changing a module and watching for a plan.

This file goes at the repository root

Atlantis reads exactly one repo-level configuration, from the root of the default branch. A copy inside a project directory is ignored silently, which reads as Atlantis not picking the configuration up at all rather than as it being in the wrong place.

The server decides what a repository may set

apply_requirements needs allowed_overrides to include it, and a custom workflow needs allow_custom_workflows: true. Without them Atlantis rejects the whole file rather than that one key, so one unpermitted setting stops every project in the repository.

A project is a directory and a workspace together

Which is how two projects can share a directory, and why two entries with both the same means two plans against one state, serialised behind the same lock. The workspace also has to exist: Atlantis runs terraform workspace select with it.

Pin terraform_version per project

Otherwise Atlantis uses whatever its own default is, and that changes when the server is upgraded. Since state written by a newer Terraform cannot be read by an older one, an unpinned project can be silently upgraded by somebody else's server maintenance and then refuse to run on a laptop.

What this cannot see

Your repository layout, so the number of ../ in the module path is a guess. Count the levels yourself. Everything is generated in your browser.