Skip to main content

terrasnek

GitHub Actions codecov PyPI version Documentation Status GitHub issues GitHub license API Method Support

A Python Client for the Terraform Cloud API.


terrasnek logo

Overview

The goal of this project is to support all endpoints available in the Terraform Cloud API and Terraform Enterprise API. In general, terrasnek is developed against the Terraform Cloud APIs first (as most features are released there first and may not be available in Terraform Enterprise), but all endpoints are loved equally and this project intends to support both types of users.

Note: This project is tested against Terraform Enterprise often, but the code coverage represented in this repo will always represent coverage against Terraform Cloud Business Tier (skipping all admin modules), so the coverage percentage is higher than represented in the badge.

Terraform Enterprise Release Notes Terraform Cloud API Changelog

Note: Terraform Enterprise is the self-hosted distribution of Terraform Cloud. It offers enterprises a private instance of the Terraform Cloud application, with no resource limits and with additional enterprise-grade architectural features like audit logging and SAML single sign-on.

Using terrasnek

For more details on using each endpoint, check out the docs or the test directory.

from terrasnek.api import TFC
import os

TFC_TOKEN = os.getenv("TFC_TOKEN", None)
TFC_URL = os.getenv("TFC_URL", None)  # ex: https://app.terraform.io
# set to True if you want to use HTTP or insecure HTTPS
SSL_VERIFY = os.getenv("SSL_VERIFY", False)

if __name__ == "__main__":
    api = TFC(TFC_TOKEN, url=TFC_URL, verify=SSL_VERIFY)
    api.set_org("YOUR_ORGANIZATION")

terrasnek to Terraform Cloud API Spec Completeness

To compare terrasnek implemented endpoints to those listed on the Terraform Cloud API docs, view the auto-generated TERRASNEK_API_COVERAGE_COMPLETENESS.md file. The goal is to always have over 95% of all published endpoints implemented at any time.

terrasnek Common Use Case Examples

See the terrasnek docs. You can download the docs as a PDF directly from readthedocs.io.

Contributing to terrasnek

If you'd like to contribute to terrasnek, review CONTRIBUTING.md.

Relevant Blogs


Note: This repo is not officially maintained by HashiCorp.

Metadata

Release files for terrasnek 0.1.14

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

Source distribution (sdist)

Source distribution for terrasnek 0.1.14
File Size Uploaded
terrasnek-0.1.14.tar.gz 75.6 kB Details

Built distribution (wheel)

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

Total release size: 223.2 kB

Release files / terrasnek-0.1.14.tar.gz

Download URL terrasnek-0.1.14.tar.gz
Size 75.6 kB
Tags Source
SHA-256 checksum
How to use checksums
255b97ffa2ca747d0b27cbac9c8ffe97202e94ef1245a87c4c29fd6ff3e617b7
BLAKE2b-256 checksum
How to use checksums
8de69450560c4bd1df7e4dfb8fc60e2aa8608ce4a2fd8347b91d2d10d78c29dc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.8.2 requests/2.22.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.18

Release files / terrasnek-0.1.14-py3-none-any.whl

Download URL terrasnek-0.1.14-py3-none-any.whl
Size 147.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a6f4cc4088b3fc0b3627089f600c347c785c5a9c7210bfc86e17d0e718b176d0
BLAKE2b-256 checksum
How to use checksums
5e78b5643882445fd72b21cf5e96eb00ec4c840c13c2b642d10aad06d542fa29
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.8.2 requests/2.22.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.18

Release history Release notifications | RSS feed

This release

0.1.14 This release

2 release files

0.1.12

2 release files

0.1.11

2 release files

0.1.10

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.0.16

2 release files

0.0.15

2 release files

0.0.14

2 release files

0.0.13

2 release files

0.0.11

2 release files

0.0.10

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

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