Overview
Make Terraform Cloud API calls for common platform administration tasks.
Reference
Available Functions
Show organization details
List teams
List projects
Get project ID from project name
List workspaces in a project
Get workspace ID from workspace name
Move workspace into a project
Examples
import sys
import tfc_admin
# List all teams in an organization.
teams_list = []
page_number = 1
# Iterate through all pages of teams.
while True:
teams = tfc_admin.get_teams(
sys.argv[1], # token
sys.argv[2], # organization
page_number
)
if not teams['data']:
break
for team in teams['data']:
teams_list.append(team['attributes']['name'])
page_number += 1
# Print the list of teams.
print(teams_list)
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tfc_admin-1.1.0.tar.gz
(2.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tfc_admin-1.1.0.tar.gz.
File metadata
- Download URL: tfc_admin-1.1.0.tar.gz
- Upload date:
- Size: 2.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.10.12 Linux/5.4.109+
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
31160740c4c241fdc58ff21f92b0ab02bc44e7504c327099be41678c707f0a66
|
|
| MD5 |
e910fca233ec6b3b7d98684a1f5ea74a
|
|
| BLAKE2b-256 |
1f70c86076f29e98597e54969e57e86a07b62376d75feb858b4a01c92e4e8011
|
File details
Details for the file tfc_admin-1.1.0-py3-none-any.whl.
File metadata
- Download URL: tfc_admin-1.1.0-py3-none-any.whl
- Upload date:
- Size: 3.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.10.12 Linux/5.4.109+
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8708dfa3ec252410ab022906698f2a3fe38cca15ae8df064a7a50a53d8acfa7d
|
|
| MD5 |
07052faeb07b6dafea83f20ae9939e1a
|
|
| BLAKE2b-256 |
d00d92b6b42a72b89f05caea72a46601ed0efe2276fdeeeb3e02abc97bae28ff
|