Skip to main content

A Python client for the Terraform Cloud API

Project description

terrasnek

CircleCI 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

terrasnek-0.1.12.tar.gz (69.1 kB view details)

Uploaded Source

Built Distribution

terrasnek-0.1.12-py3-none-any.whl (136.5 kB view details)

Uploaded Python 3

File details

Details for the file terrasnek-0.1.12.tar.gz.

File metadata

  • Download URL: terrasnek-0.1.12.tar.gz
  • Upload date:
  • Size: 69.1 kB
  • Tags: Source
  • Uploaded using 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.13

File hashes

Hashes for terrasnek-0.1.12.tar.gz
Algorithm Hash digest
SHA256 09d12d89b6ad85431d73c51a27b24078fc0902bf796efcb565119a0124794dc5
MD5 0888ca55107fdb6518b0c2e4efdc3871
BLAKE2b-256 bee0ca073c520fb97e4f6387a14580efdf370d2227eb4a109fb8a15e9ba11ba1

See more details on using hashes here.

File details

Details for the file terrasnek-0.1.12-py3-none-any.whl.

File metadata

  • Download URL: terrasnek-0.1.12-py3-none-any.whl
  • Upload date:
  • Size: 136.5 kB
  • Tags: Python 3
  • Uploaded using 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.13

File hashes

Hashes for terrasnek-0.1.12-py3-none-any.whl
Algorithm Hash digest
SHA256 4142b832fdce5635f25f00bcdf5d7b0e13d37c334cc2f8f847a85c8cc88217cc
MD5 a04ce5f6a5dea65edf54263668af0884
BLAKE2b-256 0efa428452c5a01679bab19d50cdebb70426214f3529e6126e536252bc5aabc9

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page