terrorform
Python wrapper for Terraform
Purpose
This library provides a thin wrapper around the Terraform build tool. Existing libraries for the same purpose were
either more complicated than what I needed or defunct. The name terrorform was chosen because every other name I
could think of was being squatted on in PyPi.
Package Installation and Usage
The package is available on PyPi:
python -m pip install terrorform
The library can be imported in the normal ways:
import terrorform
from terrorform import *
Examples
This library supports init, apply, and destroy workflows:
from terrorform import *
# Run full setup/teardown workflow with target directory equal to current working directory
init_resp = terrorform.init()
apply_resp = terrorform.apply()
destroy_resp = terrorform.destroy()
The library also supports top level synonyms, allowing the same workflows to be run without
referencing the terrorform class:
from terrorform import *
init_resp = init()
apply_resp = apply()
destroy_resp = destroy()
Keyword arguments, boolean flags, and custom variables are passed to each workflow. No checking is performed to ensure that they are valid terraform CLI options. These parameters are split into three categories: keyword arguments, boolean flags, and custom variables:
apply_resp = terrorform.apply(
# Terraform-specific keyword args, both global and non-global
kw_args={
"-chdir": "/tmp/terrorform/"
},
# Terraform-specific boolean flags
boolean_flags=["-no-color"],
# Custom variables required by your terraform scripts
vars_dict={
"my_custom_variable": "Hello"
}
)
Testing
Tests are run using pytest:
python -m pytest tests.py
Metadata
Release files for terrorform 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| terrorform-0.2.1.tar.gz | 4.3 kB | Without provenance | Details for terrorform-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| terrorform-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for terrorform-0.2.1-py3-none-any.whl |
Total release size: 9.1 kB
Release files / terrorform-0.2.1.tar.gz
| Download URL | terrorform-0.2.1.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
025b070ed692a31cb2bd79eb2e443db1395f72e437d6ddb366be8e4dd723aefe
|
|
BLAKE2b-256 checksum How to use checksums |
de4d4bdf1611b10d0f0fe84b65bec3f22ae5e0137f08391657d2321d3e478f54
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.6
|
Release files / terrorform-0.2.1-py3-none-any.whl
| Download URL | terrorform-0.2.1-py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d85bc4d0347b7b130ed78065a8ec9b2733d93665d203e30b27f465f90d78ed06
|
|
BLAKE2b-256 checksum How to use checksums |
28fc80944173e26a9dcb3274a2a19e3decb64279684fd21828f935f95ac09dc0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.6
|
Security for terrorform 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.