Configuration
Properties
| Property | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Must be "terraformCloudRun" |
organization | string | Yes | Terraform Cloud organization name |
address | string | Yes | Terraform Cloud address (e.g., https://app.terraform.io) |
token | string | Yes | Terraform Cloud token (supports Go templates) |
runId | string | Yes | Terraform Cloud run ID |
Response Data Available in CEL
The Terraform Cloud Run provider makes the following data available in your CEL success conditions:result.ok-trueif the run completed successfullyresult.statusCode- HTTP status code from Terraform Cloud APIresult.value- Run status (e.g.,"applied","errored","planned")result.json- Full Terraform Cloud API responseresult.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 theorganization,
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