-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
It fails when applying a plan containing job resources creation (plus, it actually creates them half way in dbt cloud but no stated of that is saved, assuming due to the failure)
Error message
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x9f042c]
Error: The terraform-provider-dbtcloud_v1.2.1 plugin crashed!
Resource configuration
# Daily prod build
resource "dbtcloud_job" "daily_prd" {
for_each = var.projects
name = "${each.key} - daily prd"
project_id = local.project_ids[each.key]
environment_id = local.env_ids["${each.key}-prd"]
execute_steps = [
"dbt build" #TODO: Add `--select [dp-name]`
]
triggers = {
schedule = true
on_merge = false
git_provider_webhook = false
}
schedule_days = [0, 1, 2, 3, 4, 5, 6]
schedule_type = "days_of_week"
schedule_hours = [0]
}
# Merge into prod
resource "dbtcloud_job" "merge_into_prd" {
for_each = var.projects
name = "${each.key} - merge into prd"
project_id = local.project_ids[each.key]
environment_id = local.env_ids["${each.key}-prd"]
deferring_environment_id = local.env_ids["${each.key}-prd"]
run_compare_changes = true
generate_docs = true
execute_steps = [
"dbt build --select state:modified+ --fail-fast"
]
triggers = {
schedule = false
on_merge = true
git_provider_webhook = false
}
}
# Ad-hoc prod
resource "dbtcloud_job" "adhoc_prd" {
for_each = var.projects
name = "${each.key} - ad-hoc prd"
project_id = local.project_ids[each.key]
environment_id = local.env_ids["${each.key}-prd"]
execute_steps = [
"dbt build" #TODO: Modify as required
]
triggers = {
schedule = false
on_merge = false
git_provider_webhook = false
}
}
# MR job in UAT on PR open/update
resource "dbtcloud_job" "ci_uat" {
for_each = var.projects
name = "${each.key} - MR job (uat)"
project_id = local.project_ids[each.key]
environment_id = local.env_ids["${each.key}-uat"]
deferring_environment_id = local.env_ids["${each.key}-prd"]
run_compare_changes = true
run_lint = true
execute_steps = [
"dbt build --select state:modified+ --fail-fast"
]
triggers = {
schedule = false
on_merge = false
git_provider_webhook = true
}
}
Expected behavior
The 4 jobs successfully created
Config (please complete the following information):
- dbt Cloud provider version 1.2.1
Additional context
run-apply-log.txt
run-plan-log.txt

maehster
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working