This repository hosts Team Carbon's custom Terraform bundles for use in Terraform Enterprise. These bundles exist so that the Terraform binary in Terraform Enterprise has access to custom providers (like Layer0) alongside the correct version of Terraform itself.
Within Terraform Enterprise, navigate to the Site Admin section, then the Terraform Versions tab, and then click the Add terraform version button.
You will need to add the name of the Terraform bundle, which is not the same as the default filename generated by terraform-bundle
.
It should just be the version number and the bundle datestamp.
- ❌
terraform_0.11.8-bundle2019091222_linux_amd64.zip
- ✅
0.11.8-bundle2019091222
Make sure to enable usage of the version via the checkbox, then supply the URL and SHA256 checksum of the file. The URL must be a download link to the bundle, which at the time of this writing follows this format:
https://github.com/quintilesims/carbon-terraform-bundles/raw/master/bundles/BUNDLE_FILENAME
For the most part, you should just follow the instructions outlined in the terraform-bundle
tool's README.
A few things to note:
-
You will need a local copy of the official Terraform repository, and you will need to checkout to the specific tag of Terraform for which you intend to build the bundle. Also make sure that you pin this same version of Terraform within
terraform-bundle.hcl
.- Example: Let's say you wanted to create a TFE bundle that included the v0.11.0 Layer0 provider.
Layer0 v0.11.0 requires Terraform v0.11.8, so you would need to make sure that your local Terraform clone is checked out to v0.11.8 before you go to build the
terraform-bundle
tool.
- Example: Let's say you wanted to create a TFE bundle that included the v0.11.0 Layer0 provider.
Layer0 v0.11.0 requires Terraform v0.11.8, so you would need to make sure that your local Terraform clone is checked out to v0.11.8 before you go to build the
-
Any custom plugins you want to bundle must be included in this repo, in the
plugins/
directory, and with this filename convention:terraform-provider-PROVIDERNAME_vSEMVER
. Make sure to substitutePROVIDERNAME
andSEMVER
appropriately.- ✅
terraform-provider-layer0_v0.11.0
- ✅
-
The provider name when specified in
terraform-bundle.hcl
is just the name - it should not mirror the filename.- ❌
terraform-provider-layer0: ["0.11.0"]
- ✅
layer0: ["0.11.0"]
- ❌
-
TFE bundles should be built for Linux on AMD64, so you'll need to specify that when you build the bundle:
terraform-bundle package -os=linux -arch=amd64 terraform-bundle.hcl
Once you've created a new bundle, move it into the bundles/
directory and document it in the Bundles section below:
- The link to the bundle should be a download link:
[TFE_COMPLIANT_BUNDLE_NAME](https://github.com/quintilesims/carbon-terraform-bundles/raw/master/bundles/BUNDLE_FILENAME)
- Add the SHA256 checksum of the bundle's zipfile, generated via the
sha256sum
CLI tool. - Note the bundled Terraform version, as well as any custom plugins and their versions.
(Most recent bundle at top.)
-
- SHA256 Checksum:
4beb36fde710c8147807241bccebdf782f75a4418e76a56fa8557f625ea9234c
- Terraform v0.11.8
- Layer0 v0.11.1
- SHA256 Checksum:
-
- SHA256 Checksum:
4130f957db14a5768795e06c3cd073c09615d97aded7587deddec1d707d78167
- Terraform v0.11.8
- Layer0 v0.11.0
- SHA256 Checksum: