11"""
22Terraform Cloud/Enterprise Workspace Management Example
33
4- This comprehensive example demonstrates 38 workspace operations using the python-tfe SDK,
5- providing a complete command-line interface for managing TFE workspaces with advanced
6- operations including create, read, update, delete, lock/unlock, tag management, VCS
7- integration, SSH keys, remote state, data retention, and filtering capabilities.
8-
9- API Coverage: 38/38 workspace methods (100% coverage)
10- Testing Status: All operations tested and validated
11- Organization: Logically grouped into 16 sections for easy navigation
12-
134Prerequisites:
145 - Set TFE_TOKEN environment variable with your Terraform Cloud API token
156 - Ensure you have access to the target organization
@@ -133,7 +124,6 @@ def main():
133124 parser .add_argument ("--all-tests" , action = "store_true" , help = "Run all method tests" )
134125
135126 # Listing and Filtering
136- parser .add_argument ("--page" , type = int , default = 1 , help = "Page number for listing" )
137127 parser .add_argument (
138128 "--page-size" , type = int , default = 10 , help = "Page size for listing"
139129 )
@@ -154,7 +144,6 @@ def main():
154144 try :
155145 # Create options for listing workspaces with pagination and filters
156146 options = WorkspaceListOptions (
157- page_number = args .page ,
158147 page_size = args .page_size ,
159148 search = args .search ,
160149 tags = args .tags ,
@@ -163,7 +152,7 @@ def main():
163152 project_id = args .project_id ,
164153 )
165154 print (
166- f"Fetching workspaces from organization '{ args .org } ' (page { args . page } , size { args .page_size } )..."
155+ f"Fetching workspaces from organization '{ args .org } ', size { args .page_size } )..."
167156 )
168157
169158 # Get workspaces and convert to list safely
0 commit comments