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
5 changes: 1 addition & 4 deletions examples/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
RunListOptions,
RunReadOptions,
RunVariable,
Workspace,
)


Expand Down Expand Up @@ -138,15 +139,11 @@ def main():
# Get workspace object - convert to the model type expected by run
workspace_data = client.workspaces.read_by_id(args.workspace_id)

# Create the workspace object that run models expect
from pytfe.models.workspace import Workspace

workspace = Workspace(
id=workspace_data.id,
name=workspace_data.name,
organization=workspace_data.organization,
execution_mode=workspace_data.execution_mode,
project_id=workspace_data.project_id,
tags=getattr(workspace_data, "tags", []),
)

Expand Down
4 changes: 4 additions & 0 deletions src/pytfe/models/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ class RunSource(str, Enum):
Run_Source_Configuration_Version = "tfe-configuration-version"
Run_Source_UI = "tfe-ui"
Run_Source_Terraform_Cloud = "terraform+cloud"
Run_Source_Terraform = "terraform"
Run_Source_Run_Trigger = "tfe-run-trigger"
Run_Source_Infra_Lifecycle = "tfe-infrastructure-lifecycle"
Run_Source_Module = "tfe-module"


class RunStatus(str, Enum):
Expand Down
Loading