@@ -23,13 +23,16 @@ For BigQuery, due to the list of fields being very different, you can use the `d
23
23
// legacy names will be removed from 0.3 onwards
24
24
25
25
resource "dbtcloud_connection" "databricks" {
26
- project_id = dbtcloud_project.dbt_project.id
27
- type = "adapter"
28
- name = "Databricks"
29
- database = "" // currenyly need to be empty for databricks
30
- host_name = "my-databricks-host.cloud.databricks.com"
31
- http_path = "/my/path"
32
- catalog = "moo"
26
+ project_id = dbtcloud_project.dbt_project.id
27
+ type = "adapter"
28
+ name = "Databricks"
29
+ database = "" // currenyly need to be empty for databricks
30
+ host_name = "my-databricks-host.cloud.databricks.com"
31
+ http_path = "/my/path"
32
+ catalog = "moo"
33
+ // add the following for OAuth
34
+ oauth_client_id = "yourclientid"
35
+ oauth_client_secret = "yourclientsecret"
33
36
}
34
37
35
38
resource "dbtcloud_connection" "redshift" {
@@ -42,13 +45,17 @@ resource "dbtcloud_connection" "redshift" {
42
45
}
43
46
44
47
resource "dbtcloud_connection" "snowflake" {
45
- project_id = dbtcloud_project.dbt_project.id
46
- type = "snowflake"
47
- name = "My Snowflake warehouse"
48
- account = "my-snowflake-account"
49
- database = "MY_DATABASE"
50
- role = "MY_ROLE"
51
- warehouse = "MY_WAREHOUSE"
48
+ project_id = dbtcloud_project.dbt_project.id
49
+ type = "snowflake"
50
+ name = "My Snowflake warehouse"
51
+ account = "my-snowflake-account"
52
+ database = "MY_DATABASE"
53
+ role = "MY_ROLE"
54
+ warehouse = "MY_WAREHOUSE"
55
+ // add the following for OAuth
56
+ oauth_client_id = "yourclientid"
57
+ oauth_client_secret = "yourclientsecret"
58
+ allow_sso = true
52
59
}
53
60
```
54
61
@@ -64,24 +71,24 @@ resource "dbtcloud_connection" "snowflake" {
64
71
65
72
### Optional
66
73
67
- - ` account ` (String) Account name for the connection
68
- - ` allow_keep_alive ` (Boolean) Whether or not the connection should allow client session keep alive
69
- - ` allow_sso ` (Boolean) Whether or not the connection should allow SSO
70
- - ` catalog ` (String) Catalog name if Unity Catalog is enabled in your Databricks workspace
74
+ - ` account ` (String) Account name for the connection (for Snowflake)
75
+ - ` allow_keep_alive ` (Boolean) Whether or not the connection should allow client session keep alive (for Snowflake)
76
+ - ` allow_sso ` (Boolean) Whether or not the connection should allow SSO (for Snowflake)
77
+ - ` catalog ` (String) Catalog name if Unity Catalog is enabled in your Databricks workspace (for Databricks)
71
78
- ` host_name ` (String) Host name for the connection, including Databricks cluster
72
- - ` http_path ` (String) The HTTP path of the Databricks cluster or SQL warehouse
79
+ - ` http_path ` (String) The HTTP path of the Databricks cluster or SQL warehouse (for Databricks)
73
80
- ` is_active ` (Boolean) Whether the connection is active
74
- - ` oauth_client_id ` (String) OAuth client identifier
75
- - ` oauth_client_secret ` (String) OAuth client secret
81
+ - ` oauth_client_id ` (String) OAuth client identifier (for Snowflake and Databricks)
82
+ - ` oauth_client_secret ` (String) OAuth client secret (for Snowflake and Databricks)
76
83
- ` port ` (Number) Port number to connect via
77
84
- ` private_link_endpoint_id ` (String) The ID of the PrivateLink connection. This ID can be found using the ` privatelink_endpoint ` data source
78
- - ` role ` (String) Role name for the connection
85
+ - ` role ` (String) Role name for the connection (for Snowflake)
79
86
- ` tunnel_enabled ` (Boolean) Whether or not tunneling should be enabled on your database connection
80
- - ` warehouse ` (String) Warehouse name for the connection
87
+ - ` warehouse ` (String) Warehouse name for the connection (for Snowflake)
81
88
82
89
### Read-Only
83
90
84
- - ` adapter_id ` (Number) Adapter id created for the Databricks connection
91
+ - ` adapter_id ` (Number) Adapter id created for the Databricks connection (for Databricks)
85
92
- ` connection_id ` (Number) Connection Identifier
86
93
- ` id ` (String) The ID of this resource.
87
94
0 commit comments