-
Notifications
You must be signed in to change notification settings - Fork 1
feat(workspace-run-task): add workspace run task support #64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Add WorkspaceResource model and WorkspaceResourceListOptions - Add WorkspaceResourcesService for listing workspace resources - Add workspace_resources.py example CLI tool with flag-based interface - Add comprehensive unit tests for workspace resources - Update client.py to include workspace_resources service - Update models/__init__.py with WorkspaceResource exports
- Remove urllib.parse import - Remove URL encoding for workspace_id parameter - Workspace IDs are alphanumeric with hyphens, no encoding needed - Consistent with other services in the codebase
- Remove test_list_workspace_resources_url_encoding test - URL encoding is not needed for workspace IDs - All 376 tests now passing
- Add WorkspaceRunTask models and resources - Add WorkspaceRunTasks service with CRUD operations - Update RunTask model to include workspace_run_tasks relationship - Fix Stage enum to use underscore format (pre_plan, post_plan, etc.) - Add comprehensive unit tests (20 tests) - Add example CLI for workspace run task operations - Update client to include workspace_run_tasks service
8162724 to
ffcd5cb
Compare
Collaborator
Author
|
Rebase for this PR was not successful hence closing this PR |
Collaborator
Author
|
Rebase for this PR wasn't successful hence closing this PR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds comprehensive support for Terraform Cloud Workspace Run Tasks, enabling users to attach, manage, and configure run tasks at the workspace level through the python-tfe SDK.
What's Changed
New Functionality:
Bug Fixes:
New Files:
Modified Files:
Testing plan
Unit Tests (27/27 passing):
Code Quality:
Example Usage:
External links
Output from tests
pytest tests/units/test_workspace_run_task.py tests/units/test_run_task.py -v
========================= test session starts ==========================
collected 27 items
test_workspace_run_task_list PASSED
test_workspace_run_task_list_with_options PASSED
test_workspace_run_task_list_with_pagination PASSED
test_workspace_run_task_list_empty PASSED
test_workspace_run_task_read PASSED
test_workspace_run_task_read_with_includes PASSED
test_workspace_run_task_create PASSED
test_workspace_run_task_create_with_all_options PASSED
test_workspace_run_task_update PASSED
test_workspace_run_task_update_enforcement_level PASSED
test_workspace_run_task_update_stage PASSED
test_workspace_run_task_delete PASSED
test_workspace_run_task_list_invalid_workspace_id PASSED
test_workspace_run_task_read_invalid_workspace_id PASSED
test_workspace_run_task_read_invalid_id PASSED
test_workspace_run_task_create_invalid_workspace_id PASSED
test_workspace_run_task_update_invalid_workspace_id PASSED
test_workspace_run_task_update_invalid_id PASSED
test_workspace_run_task_delete_invalid_workspace_id PASSED
test_workspace_run_task_delete_invalid_id PASSED
test_run_task_create PASSED
test_run_task_list PASSED
test_run_task_read PASSED
test_run_task_update PASSED
test_run_task_update_url PASSED
test_run_task_delete PASSED
test_run_task_attach_to_workspace PASSED
========================= 27 passed in 0.29s ===========================
141 files already formatted
All checks passed!
Success: no issues found in 86 source files
Rollback Plan
If this change needs to be reverted, we will:
Changes to Security Controls
No changes to security controls. This PR adds new API resource management functionality using the existing authentication and authorization mechanisms."
PCI review checklist
I have documented a clear reason for, and description of, the change I am making.
If applicable, I've documented a plan to revert these changes if they require more than reverting the pull request.
If applicable, I've documented the impact of any changes to security controls.
Examples of changes to security controls include using new access control methods, adding or removing logging pipelines, etc.
If you have any questions, please contact your direct supervisor, GRC (#team-grc), or the PCI working group (#proj-pci-reboot). You can also find more information at PCI Compliance.