Bundles terraform modules based on a Terrafile
to the vendor/modules
folder. Used by the Terraspace Terraform Framework.
Create a Terrafile
file:
org "boltops-tools" # set default org
# GitHub repo with default org
mod "s3", source: "terraform-aws-s3", version: "master"
# GitHub repo with explicit org
# mod "elasticache", source: "boltopspro/terraform-aws-elasticache"
# Terraform registry
mod "sg", source: "terraform-aws-modules/security-group/aws", version: "3.10.0"
Running terraspace bundle
creates the Terrafile.lock
file, which locks the versions.
terraspace bundle
For more detailed usage instructions refer to the Terraspace Terrafile docs
To install:
gem install terraspace-bundler
- This is a simple implementation for Terraspace use.
- Handles updating the
Terrafile.lock
based on theTerrafile
- Others running the
terraspace bundle install
will install the exact same module versions based theTerrafile.lock
. - To update
Terraform.lock
runterraspace bundle update
. - The repos are downloaded to the
/tmp/terraspace-bundler
area as a cache. Delete the cache by runningterraspace bundle purge_cache
.
Bug reports and pull requests are welcome on GitHub at https://github.com/boltops-tools/terraspace-bundler.