Manage private shared terraform modules deployed to S3.
Project description
Terrable
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.
Installation
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.
Usage
Terrable operates primarily on a directory that contains within it one or more module directories. For example:
+---modules
| \---aws-lambda-function
| main.tf
| output.tf
| variables.tf
| policy.json
|
| \---aws-dynamo-db-table
| main.tf
| output.tf
| variables.tf
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file terrable-0.2.1.tar.gz
.
File metadata
- Download URL: terrable-0.2.1.tar.gz
- Upload date:
- Size: 15.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.8 CPython/3.9.7 Linux/5.4.109+
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97ea93a304174b0af3316572e230fa47e5a17017f37e65303d00afe2bd5b6ca6 |
|
MD5 | 71d5b1f1a8cb93240310c1d1d1a7d6d6 |
|
BLAKE2b-256 | bf181e5c5a2301d6f5988fc963c1aa737964a1406209a0286f2fab4c36ff814b |
File details
Details for the file terrable-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: terrable-0.2.1-py3-none-any.whl
- Upload date:
- Size: 20.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.8 CPython/3.9.7 Linux/5.4.109+
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96e3f5ee686d7d874c8f61928c9c86ce89f17c7ad381316c4de807a9440245d2 |
|
MD5 | c9a0d9ea5addaec217ae141f4de207a3 |
|
BLAKE2b-256 | 21f64cc89d1c553fc8a326e1f8818ebfafba49e00d9703accb274cf313bdae5e |