A Python client for the Terraform Cloud API
Project description
terrasnek
A Python Client for the Terraform Cloud API.
Using terrasnek
For more details on using each endpoint, checkout the test
directory.
from terrasnek.api import TFC
import os
TFC_TOKEN = os.getenv("TFC_TOKEN", None)
if __name__ == "__main__":
api = TFC(TFC_TOKEN)
api.set_organization("YOUR_ORGANIZATION")
Contributing to terrasnek
Currently the following endpoints are supported:
- Account
- Applies
- Configuration Versions
- Cost Estimates
- Notification Configurations
- OAuth Clients
- OAuth Tokens
- Organizations
- Organization Memberships
- Organization Tokens
- Plan Exports
- Plans
- Policies
- Policy Checks
- Policy Sets
- Policy Set Parameters
- Registry Modules
- Runs
- Run Triggers
- SSH Keys
- State Versions
- State Version Outputs
- Team Access
- Team Memberships
- Team Tokens
- Teams
- User Tokens
- Users
- Variables
- Workspaces
- Admin Organizations
- Admin Runs
- Admin Settings
- Admin Terraform Versions
- Admin Users
- Admin Workspaces
Contributing to terrasnek
Linting the Code
make lint
Building Test Data
cd test/testdata/terraform/
tar -zcvf terrasnek_unittest_config_version.tar.gz src/*
Running Specific Tests
source test/secrets/secrets.sh
python3 -m unittest test/applies_test.py
Running All Tests
source test/secrets/secrets.sh
make coverage
Running the Tests with Coverage Info
source test/secrets/secrets.sh
make coverage
Publishing to PyPi
make pip-package
make pip-publish
Project details
Release history Release notifications | RSS feed
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.2.tar.gz
(20.6 kB
view hashes)
Built Distribution
terrasnek-0.0.2-py3-none-any.whl
(45.5 kB
view hashes)
Close
Hashes for terrasnek-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28b85141871a10188dab443133ea094aa3032cfac95297ccf50edbe2276d8f89 |
|
MD5 | edf4a1a510aebc54e586399ae2aeb169 |
|
BLAKE2b-256 | 16442d0488dd18d9664d31c2378c5f2d46a31d58d901af5abc7909444906d39b |