Skip to content

Commit 7bf553d

Browse files
committed
make fixes
1 parent 20c083e commit 7bf553d

3 files changed

Lines changed: 27 additions & 8 deletions

File tree

modules/environments/main.tf

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ resource "dbtcloud_environment" "environments" {
100100
custom_branch = try(each.value.env_data.custom_branch, null)
101101
deployment_type = try(each.value.env_data.deployment_type, null)
102102
is_active = try(each.value.env_data.is_active, null)
103-
target_name = try(each.value.env_data.target_name, null)
104103
use_custom_branch = try(each.value.env_data.custom_branch, null) != null
105104
primary_profile_id = local.resolve_primary_profile_id[each.key]
106105
extended_attributes_id = local.resolve_primary_profile_id[each.key] != null ? null : local.resolve_extended_attributes_id[each.key]
@@ -134,7 +133,6 @@ resource "dbtcloud_environment" "protected_environments" {
134133
custom_branch = try(each.value.env_data.custom_branch, null)
135134
deployment_type = try(each.value.env_data.deployment_type, null)
136135
is_active = try(each.value.env_data.is_active, null)
137-
target_name = try(each.value.env_data.target_name, null)
138136
use_custom_branch = try(each.value.env_data.custom_branch, null) != null
139137
primary_profile_id = local.resolve_primary_profile_id[each.key]
140138
extended_attributes_id = local.resolve_primary_profile_id[each.key] != null ? null : local.resolve_extended_attributes_id[each.key]

modules/project/main.tf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ locals {
3636
resource "dbtcloud_project" "projects" {
3737
for_each = local.unprotected_projects_map
3838

39-
name = "${var.target_name}${each.value.name}"
40-
description = try(each.value.description, null)
41-
type = try(each.value.type, null)
39+
name = "${var.target_name}${each.value.name}"
40+
description = try(each.value.description, null)
41+
type = try(each.value.type, null)
4242
dbt_project_subdirectory = try(each.value.dbt_project_subdirectory, null)
4343

4444
# Deferred until dbt-labs/dbtcloud supports resource_metadata on dbtcloud_project (v2 parity).
@@ -58,9 +58,9 @@ resource "dbtcloud_project" "projects" {
5858
resource "dbtcloud_project" "protected_projects" {
5959
for_each = local.protected_projects_map
6060

61-
name = "${var.target_name}${each.value.name}"
62-
description = try(each.value.description, null)
63-
type = try(each.value.type, null)
61+
name = "${var.target_name}${each.value.name}"
62+
description = try(each.value.description, null)
63+
type = try(each.value.type, null)
6464
dbt_project_subdirectory = try(each.value.dbt_project_subdirectory, null)
6565

6666
# Deferred until dbt-labs/dbtcloud supports resource_metadata on dbtcloud_project (v2 parity).

schemas/v1.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,11 @@
413413
"description": "Key of a project profile to use as the environment's primary profile.",
414414
"default": null
415415
},
416+
"is_active": {
417+
"type": ["boolean", "null"],
418+
"description": "Whether the environment is active.",
419+
"default": true
420+
},
416421
"deployment_type": {
417422
"type": ["string", "null"],
418423
"enum": ["production", "staging", "other", null],
@@ -709,6 +714,22 @@
709714
"minLength": 1,
710715
"maxLength": 128
711716
},
717+
"description": {
718+
"type": ["string", "null"],
719+
"description": "Project description. Shown in dbt Explorer.",
720+
"default": null
721+
},
722+
"type": {
723+
"type": ["integer", "null"],
724+
"description": "Project type: 0 = default, 1 = hybrid.",
725+
"enum": [0, 1, null],
726+
"default": null
727+
},
728+
"dbt_project_subdirectory": {
729+
"type": ["string", "null"],
730+
"description": "Subdirectory within the repository where the dbt project lives.",
731+
"default": null
732+
},
712733
"protected": {
713734
"type": ["boolean", "null"],
714735
"description": "If true, Terraform will prevent this resource from being destroyed (lifecycle.prevent_destroy = true)",

0 commit comments

Comments
 (0)