dbt-labs / terraform-provider-dbtcloud

dbt Cloud Terraform Provider
https://registry.terraform.io/providers/dbt-labs/dbtcloud
MIT License
82 stars 19 forks source link

dbt_cloud_job self_deferring functionality #83

Closed mwufigma closed 1 year ago

mwufigma commented 1 year ago

Currently, the dbt_cloud_job resource supports taking a deferring_job_id variable. In many cases, we would like to defer a job to a previous run of itself, which wouldn't be possible through using deferring_job_id as an argument when the job itself has not been created. It'd be great if the dbt_cloud_job resource support a defers_on_self boolean flag that would: 1) create the dbt_cloud_job resource 2) update the deferring_job_id field of the job to be its own ID

And the expected behavior is that the resource only expects either deferring_job_id or defers_on_self, with defers_on_self overriding deferring_job_id when set.

GtheSheep commented 1 year ago

completed by #86 🥳