diff --git a/Library/Homebrew/formula_auditor.rb b/Library/Homebrew/formula_auditor.rb index aa579f2ebb909..05bea08423a40 100644 --- a/Library/Homebrew/formula_auditor.rb +++ b/Library/Homebrew/formula_auditor.rb @@ -497,6 +497,17 @@ def audit_elasticsearch_kibana "They must not be upgraded to version 7.11 or newer." end + TERRAFORM_RELICENSED_VERSION = "1.6" + + def audit_terraform + return if formula.name != "terraform" + return unless @core_tap + return if formula.version < Version.new(TERRAFORM_RELICENSED_VERSION) + + problem "Terraform was relicensed to a non-open-source license from version 1.6. " \ + "It must not be upgraded to version 1.6 or newer." + end + def audit_keg_only_reason return unless @core_tap return unless formula.keg_only?