Skip to content

feat: add dbtcloud_job_completion_trigger resource (closes #663)#669

Open
trouze wants to merge 3 commits into
mainfrom
feat/issue-663-job-completion-trigger
Open

feat: add dbtcloud_job_completion_trigger resource (closes #663)#669
trouze wants to merge 3 commits into
mainfrom
feat/issue-663-job-completion-trigger

Conversation

@trouze
Copy link
Copy Markdown
Contributor

@trouze trouze commented Apr 9, 2026

Summary

  • New dbtcloud_job_completion_trigger resource manages job-chaining triggers independently from dbtcloud_job
  • Solves circular dependency problems when chaining jobs (A→B→A)
  • Attributes: job_id, trigger_job_id, project_id, statuses (success/error/canceled), resource_metadata
  • Reuses existing status mappings from pkg/utils and set helpers from pkg/helper

Closes #663

🤖 Generated with Claude Code

New standalone resource for managing job-chaining triggers independently
from dbtcloud_job. Solves circular dependency problems when chaining jobs.
Attributes: job_id, trigger_job_id, project_id, statuses (success/error/canceled),
resource_metadata. Reuses existing JobCompletionTriggerConditionsMappings
and helper.StringSetToStringSlice from pkg/utils and pkg/helper.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@trouze trouze requested a review from a team as a code owner April 9, 2026 19:55
trouze and others added 2 commits April 9, 2026 14:58
…ot managed by this resource

When a dbtcloud_job_completion_trigger resource owns the trigger, the
job resource's Read was unconditionally syncing it from the API into
state, causing the job resource to plan its removal on every refresh.

Now we only update job_completion_trigger_condition from the API if the
prior state already had it set (i.e., this resource is managing it).

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add dbtcloud_job_completion_trigger resource

1 participant