Skip to content

Commit 416d544

Browse files
committed
update integration test job
1 parent 591d248 commit 416d544

8 files changed

Lines changed: 61 additions & 61 deletions

File tree

.github/workflows/integration.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
- name: Setup Terraform
3434
uses: hashicorp/setup-terraform@v3
3535
with:
36-
terraform_version: "~> 1.7"
36+
terraform_version_file: .terraform-version
3737
terraform_wrapper: false
3838

3939
- name: Go mod download

modules/credentials/main.tf

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ resource "dbtcloud_databricks_credential" "credentials" {
4949
for_each = {
5050
for k, item in local.credential_owners_map :
5151
k => item
52-
if (
52+
if(
5353
contains(local.available_env_cred_keys, k) &&
5454
try(local.env_cred_types[k], "") == "databricks"
55-
) || (
55+
) || (
5656
!contains(local.available_env_cred_keys, k) &&
5757
try(item.cred_data.credential_type, try(item.cred_data.type, "databricks")) == "databricks"
5858
)
@@ -102,16 +102,16 @@ resource "dbtcloud_snowflake_credential" "credentials_keypair" {
102102
try(nonsensitive(var.environment_credentials[k].auth_type), "password") == "keypair"
103103
}
104104

105-
project_id = each.value.project_id
106-
auth_type = "keypair"
107-
user = try(var.environment_credentials[each.key].user, "")
108-
private_key = try(var.environment_credentials[each.key].private_key, null)
109-
private_key_passphrase = try(var.environment_credentials[each.key].private_key_passphrase, null)
110-
schema = try(var.environment_credentials[each.key].schema, try(each.value.cred_data.schema, ""))
111-
num_threads = try(var.environment_credentials[each.key].num_threads, null)
112-
database = try(var.environment_credentials[each.key].database, null)
113-
role = try(var.environment_credentials[each.key].role, null)
114-
warehouse = try(var.environment_credentials[each.key].warehouse, null)
105+
project_id = each.value.project_id
106+
auth_type = "keypair"
107+
user = try(var.environment_credentials[each.key].user, "")
108+
private_key = try(var.environment_credentials[each.key].private_key, null)
109+
private_key_passphrase = try(var.environment_credentials[each.key].private_key_passphrase, null)
110+
schema = try(var.environment_credentials[each.key].schema, try(each.value.cred_data.schema, ""))
111+
num_threads = try(var.environment_credentials[each.key].num_threads, null)
112+
database = try(var.environment_credentials[each.key].database, null)
113+
role = try(var.environment_credentials[each.key].role, null)
114+
warehouse = try(var.environment_credentials[each.key].warehouse, null)
115115
}
116116

117117
#############################################

modules/extended_attributes/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ locals {
2828
resource "dbtcloud_extended_attributes" "extended_attributes" {
2929
for_each = local.ea_map
3030

31-
project_id = each.value.project_id
31+
project_id = each.value.project_id
3232
extended_attributes = jsonencode(try(each.value.ea_data.content, each.value.ea_data))
3333
}

modules/global_connections/main.tf

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@ resource "dbtcloud_global_connection" "connections" {
3737
private_link_endpoint_id = try(each.value.private_link_endpoint_id, null)
3838

3939
databricks = try(each.value.type, "") == "databricks" ? {
40-
host = try(each.value.host, "")
41-
http_path = try(each.value.http_path, "")
42-
catalog = try(each.value.catalog, null)
40+
host = try(each.value.host, "")
41+
http_path = try(each.value.http_path, "")
42+
catalog = try(each.value.catalog, null)
4343
client_id = try(var.connection_credentials[each.key].client_id, null)
4444
client_secret = try(var.connection_credentials[each.key].client_secret, null)
4545
} : null
@@ -51,22 +51,22 @@ resource "dbtcloud_global_connection" "connections" {
5151
role = try(each.value.role, null)
5252
client_session_keep_alive = try(each.value.client_session_keep_alive, false)
5353
allow_sso = try(each.value.allow_sso, false)
54-
oauth_client_id = try(var.connection_credentials[each.key].oauth_client_id, null)
55-
oauth_client_secret = try(var.connection_credentials[each.key].oauth_client_secret, null)
54+
oauth_client_id = try(var.connection_credentials[each.key].oauth_client_id, null)
55+
oauth_client_secret = try(var.connection_credentials[each.key].oauth_client_secret, null)
5656
} : null
5757

5858
bigquery = try(each.value.type, "") == "bigquery" ? {
59-
gcp_project_id = try(each.value.gcp_project_id, "")
60-
private_key_id = try(var.connection_credentials[each.key].private_key_id, null)
61-
private_key = try(var.connection_credentials[each.key].private_key, null)
62-
client_email = try(each.value.client_email, null)
63-
client_id = try(each.value.client_id, null)
64-
auth_uri = try(each.value.auth_uri, null)
65-
token_uri = try(each.value.token_uri, null)
59+
gcp_project_id = try(each.value.gcp_project_id, "")
60+
private_key_id = try(var.connection_credentials[each.key].private_key_id, null)
61+
private_key = try(var.connection_credentials[each.key].private_key, null)
62+
client_email = try(each.value.client_email, null)
63+
client_id = try(each.value.client_id, null)
64+
auth_uri = try(each.value.auth_uri, null)
65+
token_uri = try(each.value.token_uri, null)
6666
auth_provider_x509_cert_url = try(each.value.auth_provider_x509_cert_url, null)
6767
client_x509_cert_url = try(each.value.client_x509_cert_url, null)
68-
timeout_seconds = try(each.value.timeout_seconds, null)
69-
location = try(each.value.location, null)
68+
timeout_seconds = try(each.value.timeout_seconds, null)
69+
location = try(each.value.location, null)
7070
} : null
7171

7272
postgres = try(each.value.type, "") == "postgres" ? {
@@ -94,9 +94,9 @@ resource "dbtcloud_global_connection" "protected_connections" {
9494
private_link_endpoint_id = try(each.value.private_link_endpoint_id, null)
9595

9696
databricks = try(each.value.type, "") == "databricks" ? {
97-
host = try(each.value.host, "")
98-
http_path = try(each.value.http_path, "")
99-
catalog = try(each.value.catalog, null)
97+
host = try(each.value.host, "")
98+
http_path = try(each.value.http_path, "")
99+
catalog = try(each.value.catalog, null)
100100
client_id = try(var.connection_credentials[each.key].client_id, null)
101101
client_secret = try(var.connection_credentials[each.key].client_secret, null)
102102
} : null
@@ -108,22 +108,22 @@ resource "dbtcloud_global_connection" "protected_connections" {
108108
role = try(each.value.role, null)
109109
client_session_keep_alive = try(each.value.client_session_keep_alive, false)
110110
allow_sso = try(each.value.allow_sso, false)
111-
oauth_client_id = try(var.connection_credentials[each.key].oauth_client_id, null)
112-
oauth_client_secret = try(var.connection_credentials[each.key].oauth_client_secret, null)
111+
oauth_client_id = try(var.connection_credentials[each.key].oauth_client_id, null)
112+
oauth_client_secret = try(var.connection_credentials[each.key].oauth_client_secret, null)
113113
} : null
114114

115115
bigquery = try(each.value.type, "") == "bigquery" ? {
116-
gcp_project_id = try(each.value.gcp_project_id, "")
117-
private_key_id = try(var.connection_credentials[each.key].private_key_id, null)
118-
private_key = try(var.connection_credentials[each.key].private_key, null)
119-
client_email = try(each.value.client_email, null)
120-
client_id = try(each.value.client_id, null)
121-
auth_uri = try(each.value.auth_uri, null)
122-
token_uri = try(each.value.token_uri, null)
116+
gcp_project_id = try(each.value.gcp_project_id, "")
117+
private_key_id = try(var.connection_credentials[each.key].private_key_id, null)
118+
private_key = try(var.connection_credentials[each.key].private_key, null)
119+
client_email = try(each.value.client_email, null)
120+
client_id = try(each.value.client_id, null)
121+
auth_uri = try(each.value.auth_uri, null)
122+
token_uri = try(each.value.token_uri, null)
123123
auth_provider_x509_cert_url = try(each.value.auth_provider_x509_cert_url, null)
124124
client_x509_cert_url = try(each.value.client_x509_cert_url, null)
125-
timeout_seconds = try(each.value.timeout_seconds, null)
126-
location = try(each.value.location, null)
125+
timeout_seconds = try(each.value.timeout_seconds, null)
126+
location = try(each.value.location, null)
127127
} : null
128128

129129
postgres = try(each.value.type, "") == "postgres" ? {

modules/groups/main.tf

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ locals {
2828
resource "dbtcloud_group" "groups" {
2929
for_each = local.unprotected_groups_map
3030

31-
name = each.value.name
32-
assign_by_default = try(each.value.assign_by_default, false)
31+
name = each.value.name
32+
assign_by_default = try(each.value.assign_by_default, false)
3333
sso_mapping_groups = try(each.value.sso_mapping_groups, null)
3434

3535
dynamic "group_permissions" {
@@ -45,8 +45,8 @@ resource "dbtcloud_group" "groups" {
4545
resource "dbtcloud_group" "protected_groups" {
4646
for_each = local.protected_groups_map
4747

48-
name = each.value.name
49-
assign_by_default = try(each.value.assign_by_default, false)
48+
name = each.value.name
49+
assign_by_default = try(each.value.assign_by_default, false)
5050
sso_mapping_groups = try(each.value.sso_mapping_groups, null)
5151

5252
dynamic "group_permissions" {

modules/jobs/main.tf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ locals {
1515
[
1616
for p in var.projects : [
1717
for job in try(p.jobs, []) : {
18-
project_key = try(p.key, p.name)
19-
project_id = var.project_ids[try(p.key, p.name)]
20-
env_key = try(job.environment_key, job.environment)
21-
composite_key = "${try(p.key, p.name)}_${try(job.key, job.name)}"
22-
job_data = job
18+
project_key = try(p.key, p.name)
19+
project_id = var.project_ids[try(p.key, p.name)]
20+
env_key = try(job.environment_key, job.environment)
21+
composite_key = "${try(p.key, p.name)}_${try(job.key, job.name)}"
22+
job_data = job
2323
}
2424
]
2525
],

modules/notifications/main.tf

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ locals {
1616
resource "dbtcloud_notification" "notifications" {
1717
for_each = local.notifications_map
1818

19-
user_id = try(each.value.user_id, null)
20-
on_cancel = try(each.value.on_cancel, [])
21-
on_failure = try(each.value.on_failure, [])
22-
on_success = try(each.value.on_success, [])
23-
on_warning = try(each.value.on_warning, [])
24-
notification_type = try(each.value.notification_type, 1)
25-
slack_channel_id = try(each.value.slack_channel_id, null)
19+
user_id = try(each.value.user_id, null)
20+
on_cancel = try(each.value.on_cancel, [])
21+
on_failure = try(each.value.on_failure, [])
22+
on_success = try(each.value.on_success, [])
23+
on_warning = try(each.value.on_warning, [])
24+
notification_type = try(each.value.notification_type, 1)
25+
slack_channel_id = try(each.value.slack_channel_id, null)
2626
slack_channel_name = try(each.value.slack_channel_name, null)
27-
external_email = try(each.value.external_email, null)
27+
external_email = try(each.value.external_email, null)
2828
}

modules/profiles/main.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ locals {
2828
resource "dbtcloud_profile" "profiles" {
2929
for_each = local.profiles_map
3030

31-
project_id = each.value.project_id
32-
key = each.value.profile_key
31+
project_id = each.value.project_id
32+
key = each.value.profile_key
3333
connection_id = try(
3434
lookup(var.global_connection_ids, tostring(each.value.profile_data.connection_key), null),
3535
try(tonumber(each.value.profile_data.connection_id), null)

0 commit comments

Comments
 (0)