I’m using the Terraform Cloud API to create configuration versions and upload the tar.gz files to the upload URL as laid out in https://www.terraform.io/docs/cloud/run/api.html. I have
auto-apply enabled so the run should complete on its own, after which I need to grab an output value.
What is the easiest (or “correct”) way to know when I can GET /workspaces/:workspace_id/current-state-version?include=outputs to obtain the output value?
I assume I need to poll some endpoint to determine the status of the run, and I already have a
configuration-id from the earlier call to POST /workspaces/:workspace_id/configuration-versions, but there doesn’t seem to be an API that will give me the status of a run from that ID.
Do I need to poll GET /workspaces/:workspace_id/runs and filter the list by
configuration-version? Unfortunately, this requires needing to deal with pagination once the runs exceed whatever the max page size is.
There must be a better way?