Terraform CLI switch for auto-discarding pending runs

565 Views Asked by At

Sometimes when I terraform apply, it reports that there are pending runs, and they need to be resolve before I can continue:

To view this run in a browser, visit:
https://app.terraform.io/app/ORGNAME/WORKSPACENAME/runs/run-RUNID

Waiting for 9 run(s) to finish before being queued...
Waiting for 9 run(s) to finish before being queued... (30s elapsed)

I can do this by opening the URL and clicking "Discard all past runs". In the context I'm working, it is often safe to do so.

  • Is there a switch I can pass to apply to tell it to just discard them without asking me?
  • Failing that, is there a CLI command for just discarding runs, so I can run that before apply?
  • Failing that, are there commands I can use to write my own "discard runs and apply" script?
0

There are 0 best solutions below