THipster is a tool dedicated to simplifying the difficulty associated with writing Terraform files. It allows users to write infrastructure as code in a simplified format, using either YAML (with JINJA) or the dedicated Thipster DSL.
Written entirely in Python, it leverages the Python CDK for Terraform to create Terraform files and apply them to the chosen provider.
Written in Python 3.11, thipster is designed as a python package, to be used either as a standalone tool, or as a module inside a running process like a CI/CD pipeline.
THipster is currently in an active development state. If you want to know more, please check the CHANGELOG for more details.
In order to user THipster, you will need to have the following installed:
- Python (3.11+)
- pipenv v2021.5+
- Terraform CLI (1.2+)
- Node.js and npm v16+.
To use THipster, you can simply install the package with pip:
pip install thipster
If you want to install the google dependencies aswell use
pip install thipster[google]
The list of available versions can be found on PyPI.
You can use THipster in two ways:
- By leveraging the THipster CLI
- By directly using the THipster Python package in your own code
Main feature:
- Generate Terraform files from a YAML+JINJA or THIPS file:
from thipster import Engine as ThipsterEngine
from thipster.auth import Google
from thipster.parser import ParserFactory
from thipster.repository import GithubRepo
from thipster.terraform import Terraform
# create new THipster engine
engine = ThipsterEngine(ParserFactory(), GithubRepo('THipster/models'), Google, Terraform())
# generate Terraform files and plan from a YAML+JINJA file
terraform_plan = engine.run('path/to/file/or/directory')
print(terraform_plan)
To run the tests, you can use the following command:
pip install -e .[test]
pytest tests
All known issues, bugs, and feature requests are tracked in the Issue tracker.
If you have questions, concerns, bug reports, etc, please file an issue in this repository's Issue tracker.
To install the project for development, you can use the following command:
pip install -r requirements.txt && pip install -e .[dev,test,doc,google]
pre-commit install && pre-commit run --all-files
For more information on how to help out, please check the CONTRIBUTING file.
- Projects that inspired you
- Related projects