Skip to content

Commit

Permalink
Merge pull request #301 from dbt-labs/fix/300-panic-databricks-connec…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
b-per authored Sep 25, 2024
2 parents 92380ea + 6a3e314 commit 68a36fa
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 5 deletions.
11 changes: 9 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,22 @@

All notable changes to this project will be documented in this file.

## [Unreleased](https://github.com/dbt-labs/terraform-provider-dbtcloud/compare/v0.3.16...HEAD)
## [Unreleased](https://github.com/dbt-labs/terraform-provider-dbtcloud/compare/v0.3.17...HEAD)

# [0.3.17](https://github.com/dbt-labs/terraform-provider-dbtcloud/compare/v0.3.16...v0.3.17)

### Fixes

- [#300](https://github.com/dbt-labs/terraform-provider-dbtcloud/issues/300) Panic when reading a DBX legacy connection without a catalog
- Typo in Getting started guide


# [0.3.16](https://github.com/dbt-labs/terraform-provider-dbtcloud/compare/v0.3.15...v0.3.16)

### Changes

- Make `dbname` required for Redshift and Postgres in `dbtcloud_global_connection`


# [0.3.15](https://github.com/dbt-labs/terraform-provider-dbtcloud/compare/v0.3.14...v0.3.15)

### Changes
Expand Down
2 changes: 1 addition & 1 deletion docs/guides/1_getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ resource "dbtcloud_project" "my_project" {
// create a global connection
resource "dbtcloud_global_connection" "my_connection" {
name = "My Snowflake warehouse"
snowflake {
snowflake = {
account = "my-snowflake-account"
database = "MY_DATABASE"
role = "MY_ROLE"
Expand Down
6 changes: 5 additions & 1 deletion pkg/sdkv2/resources/connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,12 @@ func resourceConnectionRead(
clientSecret := ""
if connection.Details.AdapterDetails != nil {
httpPath = connection.Details.AdapterDetails.Fields["http_path"].Value.(string)
catalog = connection.Details.AdapterDetails.Fields["catalog"].Value.(string)
hostName = connection.Details.AdapterDetails.Fields["host"].Value.(string)
var ok bool
catalog, ok = connection.Details.AdapterDetails.Fields["catalog"].Value.(string)
if !ok {
catalog = ""
}
clientID = d.Get("oauth_client_id").(string)
clientSecret = d.Get("oauth_client_secret").(string)
}
Expand Down
2 changes: 1 addition & 1 deletion templates/guides/1_getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ resource "dbtcloud_project" "my_project" {
// create a global connection
resource "dbtcloud_global_connection" "my_connection" {
name = "My Snowflake warehouse"
snowflake {
snowflake = {
account = "my-snowflake-account"
database = "MY_DATABASE"
role = "MY_ROLE"
Expand Down

0 comments on commit 68a36fa

Please sign in to comment.