Runs

class terrasnek.runs.TFCRuns(instance_url, org_name, headers, well_known_paths, verify, log_level)

Runs API Docs

apply(run_id, payload)

POST /runs/:run_id/actions/apply

Runs Apply API Doc Reference

cancel(run_id, payload)

POST /runs/:run_id/actions/cancel

Runs Cancel API Doc Reference

create(payload)

POST /runs

Runs Create API Doc Reference

Create Sample Payload

discard(run_id, payload)

POST /runs/:run_id/actions/discard

Runs Discard API Doc Reference

force_cancel(run_id, payload)

POST /runs/:run_id/actions/force-cancel

Runs Force Cancel API Doc Reference

force_execute(run_id)

POST /runs/:run_id/actions/force-execute

Runs Force Execute API Doc Reference

list(workspace_id, page=None, page_size=None)

GET /workspaces/:workspace_id/runs

Runs List API Doc Reference

Query Parameter(s) (details):
  • page (Optional)
  • page_size (Optional)
list_all(workspace_id)

This function does not correlate to an endpoint in the TFC API Docs specifically, but rather is a helper function to wrap the list endpoint, which enumerates out every page so users do not have to implement the paging logic every time they just want to list every run for a workspace.

Returns an array of objects.

required_entitlements()

Terraform Cloud Entitlements required for endpoint to work.

show(run_id)

GET /runs/:run_id

Runs Show API Doc Reference