Summary
Add a new dbtcloud_job_completion_trigger resource that manages job-chaining trigger conditions separately from the dbtcloud_job resource.
Motivation
The existing approach of configuring job completion triggers inside dbtcloud_job creates circular dependency problems when chaining jobs (Job A triggers Job B, Job B triggers Job C, etc.). A standalone resource breaks the cycle by letting each trigger be declared independently.
Resource schema
resource "dbtcloud_job_completion_trigger" "example" {
job_id = dbtcloud_job.downstream.id # downstream job
trigger_job_id = dbtcloud_job.upstream.id # upstream job
project_id = dbtcloud_project.example.id
statuses = ["success", "error"] # also supports "canceled"
# Optional migration metadata
resource_metadata = {}
}
Attributes
| Attribute |
Type |
Description |
job_id |
int64 |
The downstream job to trigger |
trigger_job_id |
int64 |
The upstream job that fires the trigger |
project_id |
int64 |
Project where the upstream job lives |
statuses |
set(string) |
Conditions: success, error, canceled |
resource_metadata |
dynamic |
Optional migration identity metadata |
Files
pkg/framework/objects/job_completion_trigger/model.go
pkg/framework/objects/job_completion_trigger/resource.go
pkg/framework/objects/job_completion_trigger/schema.go
Source
Developed on branch fix/provider-bug-wsargent as part of account migration tooling work.
Summary
Add a new
dbtcloud_job_completion_triggerresource that manages job-chaining trigger conditions separately from thedbtcloud_jobresource.Motivation
The existing approach of configuring job completion triggers inside
dbtcloud_jobcreates circular dependency problems when chaining jobs (Job A triggers Job B, Job B triggers Job C, etc.). A standalone resource breaks the cycle by letting each trigger be declared independently.Resource schema
Attributes
job_idint64trigger_job_idint64project_idint64statusesset(string)success,error,canceledresource_metadatadynamicFiles
pkg/framework/objects/job_completion_trigger/model.gopkg/framework/objects/job_completion_trigger/resource.gopkg/framework/objects/job_completion_trigger/schema.goSource
Developed on branch
fix/provider-bug-wsargentas part of account migration tooling work.