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.


Overview

The goal of this project is to support all endpoints available in the Terraform Cloud API. It's possible that some of these endpoints won't work if you're working against an older version of Terraform Enterprise.

Terraform Enterprise Release Notes

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. I also wrote a blog post showing how this library can be used.

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", None)

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

terrasnek to Terraform Cloud API Spec Parity

To see the which endpoints are implemented in terrasnek compared to those that are listed on the Terraform Cloud API docs, view the auto-generated API_PARITY_TABLE.md file.

terrasnek Common Use Case Examples

See the terrasnek documentation.

Contributing to terrasnek

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


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.0.6.tar.gz (42.4 kB view hashes)

Uploaded Source

Built Distribution

terrasnek-0.0.6-py3-none-any.whl (91.3 kB view hashes)

Uploaded Python 3

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