<commit_before># download-terraform-binaries

[![Build Status](https://travis-ci.org/patrickdappollonio/download-terraform-binaries.svg?branch=master)](https://travis-ci.org/patrickdappollonio/download-terraform-binaries)

A bash script to download the most up-to-date Terraform binaries per platform. This script, when executed,
will download the terraform compiled binary from the [terraform.io website](https://www.terraform.io/)
based on the [Hashicorp Checkpoint API](https://checkpoint.hashicorp.com/) -- as a way to find the latest
version available.

## Usage

To execute it, simply run the following command:

```bash
bash <(curl -s https://raw.githubusercontent.com/patrickdappollonio/download-terraform-binaries/master/download_terraform_binaries.sh)
```
## Details

The script by default will save the binaries into the current directory in a `bin/` folder. Inside
that folder, there will be a folder for each platform you requested the download for. For example,
if you request the plarforms `windows`, `darwin` and `linux`, then you'll get a bin folder with the
following structure:

```
$ tree bins/
bins/
├── darwin
├── linux
└── windows<commit_msg>Link to the Github issue where why "latest" doesn't exist is explained.<commit_after># download-terraform-binaries

[![Build Status](https://travis-ci.org/patrickdappollonio/download-terraform-binaries.svg?branch=master)](https://travis-ci.org/patrickdappollonio/download-terraform-binaries)

A bash script to download the most up-to-date Terraform binaries per platform. This script, when executed,
will download the terraform compiled binary from the [terraform.io website](https://www.terraform.io/)
based on the [Hashicorp Checkpoint API](https://checkpoint.hashicorp.com/) -- as a way to find the latest
version available.

Unfortunately, Hashicorp does not provide a way to download the latest version of their software in an easy way,
[and with a fair reason](https://github.com/hashicorp/terraform/issues/9803#issuecomment-257903082), hence the
existence of the page you're reading.

## Usage

To execute it, simply run the following command:

```bash
bash <(curl -s https://raw.githubusercontent.com/patrickdappollonio/download-terraform-binaries/master/download_terraform_binaries.sh)
```
## Details

The script by default will save the binaries into the current directory in a `bin/` folder. Inside
that folder, there will be a folder for each platform you requested the download for. For example,
if you request the plarforms `windows`, `darwin` and `linux`, then you'll get a bin folder with the
following structure:

```
$ tree bins/
bins/
├── darwin
├── linux
└── windows
{'fraction_non_alphanumeric': 0.10298000754432289, 'fraction_numerical': 0.004903809883062995, 'mean_word_length': 5.181818181818182, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 11, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 17, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '35369', 'n_tokens_mistral': 797, 'n_tokens_neox': 780, 'n_words': 286}