Skip to main content

Manage private shared terraform modules deployed to S3.

Project description


PyPI version build status coverage report Code style: black Code style: flake8 Code style: mypy PyPI - License

Terraform private module manager that uses S3 as a backend. Includes simple versioning of modules to make forward migration easier. Terraform supports referencing modules stored in S3 as compressed files (see S3 Bucket for more details). However, managing those packages is not part of Terraform itself. That's where terr•able comes in. The terrable CLI allows for bundling terraform module directories into compressed files and deploying them to S3 with simple incremental versioning. That way modules changes can be gradually introduced in dependent projects as needed without causing conflicts.


Terrable is available via pip:

$ pip install terrable

or via poetry:

# poetry install terrable --dev

Once installed, the terrable CLI command will be available in your terminal.


Terrable operates primarily on a directory that contains within it one or more module directories. For example:

|   \---aws-lambda-function
|           policy.json
|   \---aws-dynamo-db-table

Here the root "modules" folder contains two modules "aws-lambda-function" and "aws-dynamo-db-table". To deploy these as modules via terrable to an S3 bucket execute the command from the parent directory of the modules folder:

$ terrable publish ./modules/ --bucket=<BUCKET_NAME> --profile=<AWS_PROFILE_NAME>

This command will iterate through each folder inside the modules directory and publish any that have changed since their previous publish. Any modules found not to have changed will be skipped. This can be overridden with the --force flag. It's also possible to publish only specific modules within that folder by including the --target=aws-lambda-function flag. This flag can be specified multiple times to publish a select number of specific modules for a given command.

To inspect modules, there is a list command:

$ terrable list <MODULE_NAME> --bucket=<BUCKET_NAME> --profile=<AWS_PROFILE_NAME>

This command will print all of the versions and associated metadata for the specified module.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

terrable-0.2.1.tar.gz (15.0 kB view hashes)

Uploaded Source

Built Distribution

terrable-0.2.1-py3-none-any.whl (20.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page