Files
chromebrew/packages/terraform.rb
2024-08-26 10:40:45 +10:00

31 lines
1.4 KiB
Ruby

require 'package'
class Terraform < Package
description 'Terraform is a tool for building, changing, and combining infrastructure safely and efficiently.'
homepage 'https://www.terraform.io/'
version '1.9.5'
license 'Apache-2.0, BSD-2, BSD-4, ECL-2.0, imagemagick, ISC, JSON, MIT, MIT-with-advertising, MPL-2.0 and unicode'
compatibility 'all'
source_url({
aarch64: "https://releases.hashicorp.com/terraform/#{version}/terraform_#{version}_linux_arm.zip",
armv7l: "https://releases.hashicorp.com/terraform/#{version}/terraform_#{version}_linux_arm.zip",
i686: "https://releases.hashicorp.com/terraform/#{version}/terraform_#{version}_linux_386.zip",
x86_64: "https://releases.hashicorp.com/terraform/#{version}/terraform_#{version}_linux_amd64.zip"
})
source_sha256({
aarch64: '6a6436ce51a72317bd3f72fddb06e2f7ee19bd4f1a39d10e64fefd0491722e35',
armv7l: '6a6436ce51a72317bd3f72fddb06e2f7ee19bd4f1a39d10e64fefd0491722e35',
i686: '190dec902043ea3ef7889c6e5ba5d9c96f6e607039c4340a66f289c945a01320',
x86_64: '9cf727b4d6bd2d4d2908f08bd282f9e4809d6c3071c3b8ebe53558bee6dc913b'
})
def self.install
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/bin"
FileUtils.install 'terraform', "#{CREW_DEST_PREFIX}/bin/terraform", mode: 0o755
end
def self.postinstall
puts "\nType 'terraform' to get started.\n".lightblue
end
end