Skip to main content

Snakecraft: Generate Terraform code from Python

Have you ever felt writing Terraform code was very verbose? Have you ever disliked passing variables into layers of modules?

Snakecraft allows you to write your Terraform configuration in Python and generate the necessary Terraform code (as a .tf.json file).

Python 3.6 is required at least.

Installing and running Snakecraft

You can install Snakecraft using pip:

pip install -U snakecraft

Afterwards, you can author Snakecraft modules/packages in Python code. If you want to dive into Snakecraft by reading the examples, you can clone them from Github and process them using Snakecraft:

git clone https://github.com/xoraxax/snakecraft.git

cd snakecraft/examples

# The next commands reads snakecraft.ini:
snakecraft

# Now we can run Terraform:
cd simple_example
terraform init
terraform plan

As Snakecraft is still in an early stage, documentation is to be done.

Metadata

Release files for snakecraft 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for snakecraft 0.2.1
File Size Uploaded
snakecraft-0.2.1.tar.gz 10.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for snakecraft 0.2.1
File Interpreter ABI Platform
snakecraft-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 23.9 kB

Release files / snakecraft-0.2.1.tar.gz

Download URL snakecraft-0.2.1.tar.gz
Size 10.2 kB
Tags Source
SHA-256 checksum
How to use checksums
fadb29c0a99de287c509920ec256ff6695327710a7375932dbf42b5724a89abc
BLAKE2b-256 checksum
How to use checksums
98cd04d4b13d28e6e3ded39b5f51e8c7b32cb911893e46d6a8be45d0a4ebb065
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.7 CPython/3.9.5 Linux/5.11.0-36-generic

Release files / snakecraft-0.2.1-py3-none-any.whl

Download URL snakecraft-0.2.1-py3-none-any.whl
Size 13.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5472d6fe091a14a9280a9bb752b5d79a51ca1c7b97e531e81cfa8712ef381fbf
BLAKE2b-256 checksum
How to use checksums
8742e683f3560599e59d392b462e31eabd96150e44302af17900a4efdb0bb6b4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.7 CPython/3.9.5 Linux/5.11.0-36-generic

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page