Skip to main content
The Terraform Cloud Run provider allows you to verify that a Terraform Cloud run has completed successfully. This is useful for infrastructure deployments managed through Terraform Cloud.

Configuration

Properties

Response Data Available in CEL

The Terraform Cloud Run provider makes the following data available in your CEL success conditions:
  • result.ok - true if the run completed successfully
  • result.statusCode - HTTP status code from Terraform Cloud API
  • result.value - Run status (e.g., "applied", "errored", "planned")
  • result.json - Full Terraform Cloud API response
  • result.duration - Request duration in milliseconds

Example Success Conditions

Examples

Basic Run Verification

Using Template Variables

Run Status Values

The provider returns the following status values:
  • "applied" - Run was successfully applied
  • "planned" - Run was planned but not yet applied
  • "errored" - Run encountered an error
  • "canceled" - Run was canceled
  • "pending" - Run is pending
  • "planning" - Run is currently planning
  • "applying" - Run is currently applying

Template Variables

The Terraform Cloud Run provider supports Go templates in the organization, address, token, and runId fields:

Storing Secrets in Variables

For sensitive values like tokens, use deployment variables:

Best Practices

  • Use deployment variables for tokens and run IDs - never hardcode sensitive values
  • Verify run completion by checking that the status is "applied" or "planned"
  • Handle run failures by checking for "errored" status
  • Use appropriate intervals to poll for run status (typically 30-60 seconds)
  • Set failure limits to avoid waiting indefinitely for stuck runs