Release notes that begin "this is a breaking release, for three reasons" deserve to be read slowly. Atlantis v0.49.0 is one of those. If you run Atlantis to automate Terraform pull requests, don't bump the image tag on a Monday morning and walk away. A few things will stop working, and one of them stops the server from starting at all.

The upside is that the project documents every change unusually well, and most of the fixes are tightening that your security team will like. Here is the practical version.

The three reasons it's breaking

The maintainers list them at the top of the release notes. First, the Docker images no longer include Terraform or OpenTofu, which was announced in v0.48.0. Second, 12 security advisories are fixed, and several of those fixes change behavior that existing setups may rely on. Third, v0.47.1 shipped a breaking change without saying so, the shell-injection fix in pull request 6792, and v0.49.0 documents it now so anyone upgrading from v0.47.0 or earlier sees it.

The notes also say every behavior change is documented in a "Behavior change" note on the docs page where you'd look for that setting. That's a good habit, and it means you can search the docs for a flag name and find the caveat.

Docker images: no more bundled Terraform

This is the change most people will hit. The latest, vX.Y.Z and vX.Y.Z-debian images no longer bundle Terraform or OpenTofu binaries, and they set no default Terraform version. The -alpine-slim and -debian-slim images from v0.48.0 were an intermediate step and are no longer published. If you pinned one, switch to the unsuffixed, -alpine or -debian tag, which now contain the same thing. If you build the image yourself, use the alpine or debian targets, because the slim targets are gone.

The reasoning is practical. The release notes say every advisory against any bundled Terraform or OpenTofu release showed up in scans of the Atlantis image, whether or not you used that version, and Atlantis can't own the security lifecycle of those third-party binaries. I find that persuasive. Anyone who has argued with a vulnerability scanner about a tool they don't use will understand.

What you'll see

If you relied on the bundled binary, the server refuses to start with an error saying terraform was not found in $PATH and telling you to set the default Terraform version flag. At least that's loud.

What to do

Set the default version with the --default-tf-version flag, the ATLANTIS_DEFAULT_TF_VERSION environment variable, or the Helm value defaultTFVersion. Atlantis then downloads that version at startup. Repos can still pin their own version with terraform_version. If you use OpenTofu, also set --default-tf-distribution opentofu, or defaultTFDistribution in Helm.

If your server can't reach the release hosts, for example in an air-gapped network, put a binary on the PATH yourself. Mount one, or build from the Atlantis image and copy one in, then set --tf-download=false so Atlantis uses it and doesn't try to download.

This matters if you use the Terraform release line closely. Our notes on Terraform 1.17 and its minimal-refresh flag are a reminder that the version your Atlantis downloads is now your decision, not the image's. Pin it on purpose.

Laptop on a desk by a window with a colorful desktop wallpaper

Expand

Laptop on a desk by a window with a colorful desktop wallpaper

The upgrade checklist from the maintainers

The release notes include a checklist, and I'd copy it into your change ticket. In my words:

  1. Docker images: set the default Terraform version, and the OpenTofu distribution if you use it. If downloads are blocked, mount or copy a binary.
  2. Upgrading from v0.47.0 or earlier: check workspace names and comment arguments against the v0.47.1 changes.
  3. GitHub or GitHub Enterprise Server: make sure the --gh-hostname flag matches the host in your repositories' clone URLs. Webhooks whose clone URL is on a different host are now rejected.
  4. Server-side repo config: if repos use allow_custom_workflows: true together with allowed_workflows, check that every project's workflow is in the allow-list. Repo configs that used to pass can now be rejected.
  5. Project directories: make sure no project directory is a symlink to somewhere outside the repository.
  6. Comment commands: tell users that -out, -generate-config-out, -state, -state-out and -backup are now blocked after --, and that --blocked-extra-args can no longer unblock anything.
  7. Comment -var-file: the allowlist now applies to apply, import and state rm as well as plan. Paths containing two consecutive dots are refused, and so are repo symlinks that point outside the repository and the allowlist.
  8. state rm: if state is in --allow-commands, state rm now has to meet the project's apply_requirements and import_requirements.
  9. API: if --api-secret is set, send the X-Atlantis-Token header on GET /api/locks. Check that callers of /api/plan and /api/apply send clean, repo-relative directory paths with no leading slash and no globs.
  10. Approvals on GitHub and Gitea: apply_requirements: [approved] now uses each reviewer's latest review. On Gitea, dismissed and stale approvals no longer count, and any push that changes the diff makes approvals stale.
  11. Apply: plans recorded by v0.49.0 are bound to a hash. A plan file that changes between plan and apply is rejected and has to be re-planned.

That's a long list, and that's the point. Each item exists because a security advisory showed a way to abuse the old behavior.

The inherited change: no more shell

If you're upgrading from v0.47.0 or earlier, this one will probably bite you. Per the notes, Atlantis used to build Terraform and conftest command lines as strings and run them with sh -c. Now commands run as argument vectors. Each extra_args entry is passed as exactly one argument, and shell operators, globbing and word splitting no longer apply.

Environment references such as $WORKSPACE and $DIR are still expanded in operator-configured extra_args, but not in arguments typed in a pull request comment after --. For conftest, a policy set path and each extra_args entry are still split on whitespace, so quote a path that contains a space.

Who is affected? Workflows whose extra_args relied on shell behavior, such as two flags in one entry, a pipe, a redirection or a glob. The fix is to split multi-flag entries into one argument per entry, and to move anything that needs a shell into a run step, which still runs with a shell by design.

Workspace names are validated everywhere too. A name can't contain a slash, a backslash, two dots, a dollar sign, whitespace or control characters, can't be a single dot, and can't start with a dash or a tilde. The notes point out a name containing a dollar sign never worked anyway, because the shell expanded it. If validation fails, repo config checks fail under the workspace key, or the comment is rejected with the offending value and a reason. Rename the workspace to fix it.

Dark desk setup with a laptop, keyboard and headphones

Expand

Dark desk setup with a laptop, keyboard and headphones

How I'd roll it out

I wouldn't upgrade production first. My order would be:

  1. Read the "Breaking changes" section of the release notes in full, and not only the checklist.
  2. Stand up a staging Atlantis against a throwaway repository with the same config as production, including your repos.yaml, workflows and extra_args.
  3. Set the default Terraform version before starting, so you see the real startup path rather than the error.
  4. Open a test pull request, run plan and apply, and try the comment commands your team actually uses, including any with -var-file and state rm.
  5. Check approvals on a real review flow, especially if you rely on apply_requirements: [approved] and teams that re-review after pushes.
  6. Search your repos for extra_args entries with shell syntax, and for workspace names with unusual characters, before the upgrade rather than after.
  7. Only then promote it, and keep the old image tag handy for a quick rollback.

One caution on rollback. Plans recorded by v0.49.0 are hash-bound. If you roll back mid-flight, expect to re-plan open pull requests rather than apply stale plans.

Should you care?

If you run Atlantis, yes, and soon, because a 12-advisory release isn't one to skip for long. If you don't, the broader lesson still stands: shipping a third-party binary inside your own image makes you the security owner of that binary. Atlantis has decided it doesn't want that job, and I think that's the right call, even though it makes today's upgrade a little more work.

We haven't tested v0.49.0. This post summarizes the official release notes on GitHub, which are the source for every behavior described above. Read them before you upgrade.

Frequently Asked Questions

Why does Atlantis fail to start after upgrading?

The Docker images no longer include Terraform. The server refuses to start with a message saying terraform is not found in PATH until you set --default-tf-version.

How do I use OpenTofu with v0.49.0?

Set --default-tf-version and also --default-tf-distribution opentofu, or the Helm values defaultTFVersion and defaultTFDistribution.

What if my server can't download Terraform?

Mount or copy a binary onto the PATH and set --tf-download=false so Atlantis uses it instead of trying to download one.

Do I need to worry about this if I'm already on v0.47.1?

You already have the shell-injection changes from v0.47.1, but v0.49.0 adds the Docker image change, the allow-list checks, the stricter comment arguments and hash-bound plans.

Originally published on Mango Developer.