attest is a tool for downloading terraform and verify that the SHASUM matches the archive.
- Import hashicorp public key using gpg
- Download the archive, SHA256SUM, and SHA256SUM.sig files
- Verify is signature file is not tampered with
- Verify the SHASUM matches the archive
- Install to tfenv if argument "install-tfenv" was passed to command
- gpg - OpenPGP encryption and signing tool
- Download Hashicorp public key from https://www.hashicorp.com/security
- Store Hashicorp public key from step 2 to $HOME/.gnupg/hashicorp.asc
git clone <attest_repo_url>
ln -s /<path_to_attest_repo>/attest.sh /usr/local/bin/attest
Example:
# Download and verify terraform package
Usage: attest terraform <verion number>
# Deploy package to tfenv
Usage: attest terraform <verion number> install-tfenv
terraform <verion number> Terraform version number to download and attest (eg. 0.15.4)
install-tfenv Install terraform to tfenv