Jeremy NguyenJeremy Nguyen

Why Terraform is not available on Homebrew

Why Terraform fails licensing requirements for Homebrew's core repository

  • By Jeremy Nguyen
homebrew
open-source
terraform
View on GitHub

tl;dr: Terraform isn't allowed as a formula in the Homebrew repository because it's no longer open source after changing its license to Business Source License v1.1.

As of August 4, 2026, the most popular non-core Homebrew formula is Terraform from the tap hashicorp/tap with 338,969 (0.12%) formula install requests annually, taking the place of the 195th most installed formula.1

Though, to be precise, to say the Terraform CLI is not available in the Homebrew core repository is not entirely accurate: for macOS versions Sequoia to Monterey, you can still install terraform v1.5.7, which was last released in September 2023 (nearly three years old at the time of writing).

If you review the source code for this version of Terraform, it also identifies the reason for the deprecation:2

We will not accept any new Terraform releases in homebrew/core (with the BUSL license).
The next release changed to a non-open-source license:
https://www.hashicorp.com/blog/hashicorp-adopts-business-source-license
See our documentation for acceptable licences:
  https://docs.brew.sh/License-Guidelines

As a quick aside, here is some terminology used by Homebrew to be familiar with:3

TermDefinition
FormulaPackage definition to build binaries to install
CaskPackage definition that installs pre-compiled binaries
TapThird-Party Repositories in addition to the default homebrew/core that host formulae and casks

homebrew/core, the default repository in Homebrew, does not allow non-open-source formulae.4 This restriction may be surprising to some Homebrew users given proprietary software can be installed with it, such as Spotify and Adobe Creative Cloud, but those are casks, not formulae.

Background

As the aforementioned notice cites, on August 10, 2023, the CTO of HashiCorp announced in a blog post that they were switching the license for their Terraform code from Mozilla Public License v2.0 (MPL 2.0) to the Business Source License (BSL or BUSL) v1.1.5

According to Homebrew's license guidelines:

Formulae in homebrew/core must use a licence compatible with the Debian Free Software Guidelines or be released into the public domain under the DFSG public-domain guidance.4

Of the guidelines in the Debian Free Software Guidelines, the one that I imagine that Terraform's license specifically violates is:

  1. No Discrimination Against Fields of Endeavor The license must not restrict anyone from making use of the program in a specific field of endeavor. For example, it may not restrict the program from being used in a business, or from being used for genetic research.6

Terraform's implementation of BSL has an additional use grant forbidding "competitive offerings" of the work.

You may make production use of the Licensed Work, provided Your use does not include offering the Licensed Work to third parties on a hosted or embedded basis in order to compete with IBM Corp.'s paid version(s) of the Licensed Work.

As MariaDB, the creators of the license, themselves point out: "The Business Source License (this document, or the 'License') is not an Open Source license."7

As another aside, this tap was not created by HashiCorp specifically in response to their license change. The tap has existed since 2020, including up to 2022, in which it was licensed under the MPLv2. The tap had also already hosted Terraform in addition to other formulae.

Can Terraform be a cask?

Another meaningful question that can be raised is: if Terraform can't be a formula, why can't it be a cask? As mentioned previously, casks, unlike formulae, do not necessarily need to be open-source. In fact, Terraform was already a cask on Homebrew, up until 2016 when it was moved to homebrew-core to be a formula.8

The original terraform.rb file from that period of time could theoretically still function as a cask definition. As of time of the writing, the binaries are still being published at the same location: https://releases.hashicorp.com/terraform/1.15.8/. In fact, the Terraform tap actually uses that same URL for its formula: https://github.com/hashicorp/homebrew-tap/blob/master/Formula/terraform.rb.

In fact, two BUSL-licensed HashiCorp packages, vagrant (LICENSE) and consul (license), are published in Homebrew/homebrew-cask today. While vagrant is published as a .dmg file, consul is published as a .zip similar to Terraform.

Hence, it seems that if someone wanted to, they could probably open a pull request to Homebrew/homebrew-cask for a Terraform cask definition and also get it accepted.

Are Homebrew default casks preferred over third-party taps?

PackageTypePlaceAnnual install events
vagrantcask19718,844
hashicorp/tap/hashicorp-vagrantcask3189,943
hashicorp/tap/consulformula17986,005 (6,001 on request)
consulcask7682,981

However, an interesting observation arises from this. Reviewing the data, it seems that the Homebrew default cask for vagrant outpaces its HashiCorp counterpart, while the inverse is true for consul. If I had to guess, the reason for this disparity is that users of Terraform are more likely to be consul users, and hence, since they already use the HashiCorp tap, they also gravitate to its consul formula.

Note that HashiCorp recommends installing Vagrant and Consul on macOS via their own tap as opposed to via the Homebrew core repository.9

Conclusion

Terraform actually has an open-source fork licensed under the MPL v2.0 known as OpenTofu.10 OpenTofu is available as a formula on Homebrew core, but it is ranked in 479th place with 86,580 installations (0.03%), a 72.576% decrease compared to its source-available counterpart.

In short, Terraform isn't available as a formula since, despite being source-available, its license does not adhere to standards that would qualify it as open-source. While Terraform is not currently available as a default cask on Homebrew, from what I can tell, there's nothing stopping it from being made available as one. I'm curious what would happen if someone were to open a pull request to make it available there, though I suspect HashiCorp will still nonetheless direct users to their own third-party repository.

PreviousNon-punycode emojis in domainsNextLoading arbitrary binary data with WebAssembly modules

Comments

There are currently zero comments. Leave a comment on Mastodon or any Fediverse-compatible instance.