Skip to content

Commit

Permalink
Merge pull request #297 from dbt-labs/dbname-required-postgres-redshift
Browse files Browse the repository at this point in the history
  • Loading branch information
b-per authored Sep 13, 2024
2 parents 9b94bd8 + 6b9ddb1 commit 92380ea
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 8 deletions.
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@

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

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

# [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)

Expand Down
1 change: 0 additions & 1 deletion docs/data-sources/projects.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ data dbtcloud_projects my_acme_projects {
// or can return all projects
data dbtcloud_projects my_projects {
name_contains = "acme"
}
// this can be used to make sure that there are no distinct projects with the same names for example
Expand Down
4 changes: 2 additions & 2 deletions docs/resources/global_connection.md
Original file line number Diff line number Diff line change
Expand Up @@ -282,11 +282,11 @@ Optional:

Required:

- `dbname` (String) The database name for this connection.
- `hostname` (String) The hostname of the database.

Optional:

- `dbname` (String) The database name for this connection.
- `port` (Number) The port to connect to for this connection. Default=5432
- `ssh_tunnel` (Attributes) PostgreSQL SSH Tunnel configuration (see [below for nested schema](#nestedatt--postgres--ssh_tunnel))

Expand All @@ -311,11 +311,11 @@ Read-Only:

Required:

- `dbname` (String) The database name for this connection.
- `hostname` (String) The hostname of the data warehouse.

Optional:

- `dbname` (String) The database name for this connection.
- `port` (Number) The port to connect to for this connection. Default=5432
- `ssh_tunnel` (Attributes) Redshift SSH Tunnel configuration (see [below for nested schema](#nestedatt--redshift--ssh_tunnel))

Expand Down
1 change: 0 additions & 1 deletion examples/data-sources/dbtcloud_projects/data-source.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ data dbtcloud_projects my_acme_projects {

// or can return all projects
data dbtcloud_projects my_projects {
name_contains = "acme"
}

// this can be used to make sure that there are no distinct projects with the same names for example
Expand Down
2 changes: 1 addition & 1 deletion pkg/dbt_cloud/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func NewClient(account_id *int, token *string, host_url *string) (*Client, error
}

return nil, fmt.Errorf(
"the token is valid but does not have access to the account id %d",
"the token is valid but does not have access to the account id %d. This might be due to a lack of permissions or because IP restrictions are in place for the account",
*account_id,
)

Expand Down
4 changes: 2 additions & 2 deletions pkg/framework/objects/global_connection/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ func (r *globalConnectionResource) Schema(
Description: "The port to connect to for this connection. Default=5432",
},
"dbname": resource_schema.StringAttribute{
Optional: true,
Required: true,
Description: "The database name for this connection.",
},
// for SSH tunnel details
Expand Down Expand Up @@ -320,7 +320,7 @@ func (r *globalConnectionResource) Schema(
Description: "The port to connect to for this connection. Default=5432",
},
"dbname": resource_schema.StringAttribute{
Optional: true,
Required: true,
Description: "The database name for this connection.",
},
// for SSH tunnel details
Expand Down

0 comments on commit 92380ea

Please sign in to comment.