Terraform Cloud API - Plan


I want to run a workspace via api that only runs the plan and not apply, is there an API for this? I cant seem to find this in the documentation.


Hi, welcome to the forum!

There is indeed an API for this. In Terraform Cloud, “plans without applies” (i.e. terraform plan) are called speculative plans.

In the API, this is controlled by creating a configuration version with the speculative attribute set to true (or by starting a run with an existing configuration version marked as speculative: true)

Hope that helps!