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.

More terraform tools

Terraform Validator & Formatter Does it parse, and is it formatted? Terraform dynamic Block Generator It is ingress.value, not each.value Terraform check and precondition Generator A failed check does not stop the apply Terraform variables.tf Generator From the var. references you already wrote Terraform Unused Declaration Linter Dead variables, locals and data sources Terraform Function Tester and HCL Console terraform console, in a tab Terraform for Expression Tester Where do the keys collide? Terraform Interpolation Tester null becomes an empty string Terraform templatefile Tester Render it before you apply it Terraform Resource Count Calculator How many objects, not how many blocks Terraform count to for_each Converter With the moved blocks it needs Terraform moved Block Generator Rename without destroying Terraform state mv Command Builder No plan, no undo Terraform target Flag Builder And why to stop using it Terraform outputs.tf Generator Outputs are not sensitive by default Terraform Remote State Data Source Generator It grants read of the whole state Terraform Provider Block Generator docker is not hashicorp/docker Terraform .gitignore Generator and Checker .terraform* eats the lock file Terraform to OpenTofu Migration Checker The state is the part to watch Terraform tfvars to JSON Converter The JSON file wins Terraform Version Constraint Parser What ~> actually allows Terraform Resource Address Parser Quote it before the shell eats it Terraform cidrsubnet Calculator newbits is added, not the target Terraform Import Block Generator The id is not the name Terraform Lock File Viewer Why CI fails and your laptop does not Terraform Variables Checker A missing value hangs CI Terraform tfvars to Env Vars Converter Lists and maps have to be JSON Terraform Deprecated Syntax Checker What a current Terraform rejects Terraform State File Viewer Read it without uploading it Terraform Plan JSON Viewer It is not redacted Terraform HCL to JSON Converter And what the conversion loses Terraform Module Source Validator version only works for the registry Terraform Backend Config Decoder Is state actually locked? Terraform Naming Convention Validator A hyphen makes a resource unreferenceable

Elsewhere on the site