Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 1 addition & 12 deletions examples/workspace.py
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
"""
Terraform Cloud/Enterprise Workspace Management Example

This comprehensive example demonstrates 38 workspace operations using the python-tfe SDK,
providing a complete command-line interface for managing TFE workspaces with advanced
operations including create, read, update, delete, lock/unlock, tag management, VCS
integration, SSH keys, remote state, data retention, and filtering capabilities.

API Coverage: 38/38 workspace methods (100% coverage)
Testing Status: All operations tested and validated
Organization: Logically grouped into 16 sections for easy navigation

Prerequisites:
- Set TFE_TOKEN environment variable with your Terraform Cloud API token
- Ensure you have access to the target organization
Expand Down Expand Up @@ -133,7 +124,6 @@ def main():
parser.add_argument("--all-tests", action="store_true", help="Run all method tests")

# Listing and Filtering
parser.add_argument("--page", type=int, default=1, help="Page number for listing")
parser.add_argument(
"--page-size", type=int, default=10, help="Page size for listing"
)
Expand All @@ -154,7 +144,6 @@ def main():
try:
# Create options for listing workspaces with pagination and filters
options = WorkspaceListOptions(
page_number=args.page,
page_size=args.page_size,
search=args.search,
tags=args.tags,
Expand All @@ -163,7 +152,7 @@ def main():
project_id=args.project_id,
)
print(
f"Fetching workspaces from organization '{args.org}' (page {args.page}, size {args.page_size})..."
f"Fetching workspaces from organization '{args.org}', size {args.page_size})..."
)

# Get workspaces and convert to list safely
Expand Down
6 changes: 0 additions & 6 deletions src/pytfe/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,13 +295,11 @@
StateVersion,
StateVersionCreateOptions,
StateVersionCurrentOptions,
StateVersionList,
StateVersionListOptions,
StateVersionReadOptions,
)
from .state_version_output import (
StateVersionOutput,
StateVersionOutputsList,
StateVersionOutputsListOptions,
)
from .team import (
Expand Down Expand Up @@ -352,7 +350,6 @@
WorkspaceAssignSSHKeyOptions,
WorkspaceCreateOptions,
WorkspaceIncludeOpt,
WorkspaceList,
WorkspaceListOptions,
WorkspaceListRemoteStateConsumersOptions,
WorkspaceLockOptions,
Expand Down Expand Up @@ -534,7 +531,6 @@
"WorkspaceAssignSSHKeyOptions",
"WorkspaceCreateOptions",
"WorkspaceIncludeOpt",
"WorkspaceList",
"WorkspaceListOptions",
"WorkspaceListRemoteStateConsumersOptions",
"WorkspaceLockOptions",
Expand Down Expand Up @@ -669,12 +665,10 @@
"StateVersion",
"StateVersionCreateOptions",
"StateVersionCurrentOptions",
"StateVersionList",
"StateVersionListOptions",
"StateVersionReadOptions",
# State Version Outputs
"StateVersionOutput",
"StateVersionOutputsList",
"StateVersionOutputsListOptions",
]

Expand Down
Loading
Loading