Skip to content
This repository was archived by the owner on Jun 25, 2024. It is now read-only.
This repository was archived by the owner on Jun 25, 2024. It is now read-only.

workspace - change execution mode #20

@safaa-alnabulsi-db

Description

@safaa-alnabulsi-db

Hi, we are using your library and we need to change the workspace execution mode from organisation default to workspace level. I tried to use it and got an error. I have checked the code and there's no mentioning of this attribute.

options = {
           "tf_version": self.tf_version,
           "auto_apply": False,
           "queue_all_runs": True,
           "execution_mode": "agent",
           "agent_pool_id": self.agent_pool_id,
       }
workspace = self.tfe.create_workspace(name=self.data.workspace_name, options=options)

Error

TypeError: Organization.create_workspace() got an unexpected keyword argument 'execution_mode'
TypeError: Organization.create_workspace() got an unexpected keyword argument 'execution-mode'

Does your library support this? The TFE Agent is in your docs https://developer.hashicorp.com/terraform/cloud-docs/agents

and workspace api endpoints have it as well https://developer.hashicorp.com/terraform/cloud-docs/api-docs/workspaces

If i understand your code correctly, you allow passing only a few set of parameters for creation of workspace and updating it. I don't see the execution-mode in the workspace class.

https://github.com/JFryy/terraform-enterprise-api-python-client/blob/master/pyterprise/workspace.py#L133
https://github.com/JFryy/terraform-enterprise-api-python-client/blob/master/pyterprise/organization.py#L76

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions