src/noos_tf/api.py
def run_workspace_plan(organization: str, workspace: str, token: str, message: str) -> str:
    """Run a plan in Terraform cloud."""
    # Authenticate client
    tf_client = client.TerraformClient()
    tf_client.set_auth_header(token)

    # Retrieve workspace ID
    workspace_id = tf_client.get_workspace_id(organization, workspace)

    # Create and apply a new plan
    run_id = tf_client.run_plan(workspace_id, message)
    return RUN_URL_TEMPLATE.format(organization=organization, workspace=workspace, id=run_id)
Run a plan in Terraform cloud.
Run a plan in Terraform cloud.
Run a plan in Terraform cloud .
def run_workspace_plan(organization: str, workspace: str, token: str, message: str) -> str:
    tf_client = client.TerraformClient()
    tf_client.set_auth_header(token)
    workspace_id = tf_client.get_workspace_id(organization, workspace)
    run_id = tf_client.run_plan(workspace_id, message)
    return RUN_URL_TEMPLATE.format(organization=organization, workspace=workspace, id=run_id)
def run_workspace_plan ( organization : str , workspace : str , token : str , message : str ) -> str : tf_client = client . TerraformClient ( ) tf_client . set_auth_header ( token ) workspace_id = tf_client . get_workspace_id ( organization , workspace ) run_id = tf_client . run_plan ( workspace_id , message ) return RUN_URL_TEMPLATE . format ( organization = organization , workspace = workspace , id = run_id )
Run a plan in Terraform cloud.
Run a plan in Terraform cloud .
"""Run a plan in Terraform cloud.""" # Authenticate client # Retrieve workspace ID # Create and apply a new plan
organization
str
workspace
str
token
str
message
str