Make Terraform Cloud API calls for common platform administration tasks.
Project description
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)
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
tfc_admin-1.1.0.tar.gz
(2.3 kB
view hashes)
Built Distribution
Close
Hashes for tfc_admin-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8708dfa3ec252410ab022906698f2a3fe38cca15ae8df064a7a50a53d8acfa7d |
|
MD5 | 07052faeb07b6dafea83f20ae9939e1a |
|
BLAKE2b-256 | d00d92b6b42a72b89f05caea72a46601ed0efe2276fdeeeb3e02abc97bae28ff |