WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
802b433
wip: enable usage of aws redshift data api
mmichaelb Aug 4, 2025
5dc34c5
do not query in transactions to enable usage of aws redshift data api
mmichaelb Aug 4, 2025
cfdc938
use newer version of redshift data sql driver
mmichaelb Aug 4, 2025
1b04183
fix invalid expected error message
mmichaelb Aug 5, 2025
507e56e
remove transactions to support aws redshift data api
mmichaelb Aug 5, 2025
fc24851
add possibility to declare root username dynamically
mmichaelb Aug 5, 2025
482d494
update redshift data sql driver to fix query escaping
mmichaelb Aug 5, 2025
5684215
update go mod lockfile
mmichaelb Aug 5, 2025
3237a81
apply dynamic root user name for test assertion
mmichaelb Aug 5, 2025
5fc92ea
use forked version of redshift data sql provider
mmichaelb Aug 14, 2025
8e770fc
disable transactions in redshift data provider and set request mode t…
mmichaelb Aug 14, 2025
2cd8b70
Revert "remove transactions to support aws redshift data api"
mmichaelb Aug 14, 2025
2981dfa
Revert "do not query in transactions to enable usage of aws redshift …
mmichaelb Aug 14, 2025
c9ae9fb
add logic to handle "infinity" value for redshift data api conn
mmichaelb Aug 18, 2025
826c42a
fix tests
mmichaelb Aug 18, 2025
339a5bf
update dependencies
mmichaelb Aug 18, 2025
cd69544
update readme and include limitations
mmichaelb Aug 18, 2025
445e5f5
update docs
mmichaelb Aug 18, 2025
694cc20
exclude glue data catalog external db from limitations list
mmichaelb Aug 18, 2025
6c9b414
add missing sql import
mmichaelb Aug 18, 2025
0090313
remove usage of pq#Array
mmichaelb Aug 20, 2025
ae3e69b
remove db name param from start transaction helper method
mmichaelb Aug 20, 2025
89ce2dd
retrieve username using a sql statement
mmichaelb Aug 20, 2025
3efdef4
update config logic to include redshift data driver
mmichaelb Aug 20, 2025
1d725ca
add test for redshift data api connection
mmichaelb Aug 20, 2025
393b597
add missing rows#Close statement to serverless detection func
mmichaelb Aug 21, 2025
48d6202
add option to enable redshift data sql provider debug
mmichaelb Aug 21, 2025
44c4084
separate user update and login tests
mmichaelb Aug 21, 2025
8b03b53
restructure/reformat code
mmichaelb Aug 21, 2025
9e31f87
fix user login/update test
mmichaelb Aug 21, 2025
10258fe
add acc test helper function
mmichaelb Aug 25, 2025
2ec3c14
add redshift group membership resource
mmichaelb Aug 25, 2025
333893d
add group membership docs
mmichaelb Aug 25, 2025
747b379
add example for group membership resource
mmichaelb Aug 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,20 @@ It's published on the [Terraform registry](https://registry.terraform.io/provide
## Requirements

- [Terraform](https://www.terraform.io/downloads.html) >= 1.0
- [Go](https://golang.org/doc/install) 1.21 (to build the provider plugin)
- [Go](https://golang.org/doc/install) 1.24 (to build the provider plugin)

## Limitations

Due to limited testing capacities, the following features are not tested/stable yet:

* External Schemas
* Hive Database
* RDS Postgres Database
* RDS MySQL Database
* Redshift Database
* Temporary Credentials Cluster Identifier
* Temporary Credentials Assume Role
* Datashares

## Building The Provider

Expand Down
2 changes: 2 additions & 0 deletions docs/resources/group.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ resource "redshift_group" "staff" {

Import is supported using the following syntax:

The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:

```shell
# Import group with grosysid: SELECT grosysid FROM pg_group WHERE groname = 'mygroup'

Expand Down
25 changes: 25 additions & 0 deletions docs/resources/group_membership.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "redshift_group_membership Resource - terraform-provider-redshift"
subcategory: ""
description: |-
Manages Redshift group memberships. Allows either to exclusively manage group memberships or to add members to an existing group. Note: this resource conflicts with the users attribute of the redshift_group resource
---

# redshift_group_membership (Resource)

Manages Redshift group memberships. Allows either to exclusively manage group memberships or to add members to an existing group. Note: this resource conflicts with the `users` attribute of the `redshift_group` resource



<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `name` (String) Name of the user group.
- `users` (Set of String) List of the user names to add to the group. Note: this resource does not check whether the specified users exist.

### Read-Only

- `id` (String) The ID of this resource.
2 changes: 2 additions & 0 deletions docs/resources/schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,8 @@ Optional:

Import is supported using the following syntax:

The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:

```shell
# Import schema with oid: SELECT oid FROM pg_catalog.pg_namespace WHERE nspname = 'myschema';

Expand Down
2 changes: 2 additions & 0 deletions docs/resources/user.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ resource "redshift_user" "user_with_unrestricted_syslog" {

Import is supported using the following syntax:

The [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import) can be used, for example:

```shell
# Import user with usesysid: SELECT usesysid FROM pg_user_info WHERE usename = 'mememe'

Expand Down
4 changes: 4 additions & 0 deletions examples/resources/redshift_group_membership/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
resource "redshift_group_membership" "simple" {
name = "some_group_name"
users = ["user1", "user2"]
}
62 changes: 32 additions & 30 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
module github.com/dbsystel/terraform-provider-redshift

go 1.23.7
go 1.24

toolchain go1.24.5

require (
github.com/aws/aws-sdk-go-v2 v1.37.0
github.com/aws/aws-sdk-go-v2/config v1.30.1
github.com/aws/aws-sdk-go-v2/credentials v1.18.1
github.com/aws/aws-sdk-go-v2/service/redshift v1.55.0
github.com/aws/aws-sdk-go-v2/service/sts v1.35.0
github.com/aws/aws-sdk-go-v2 v1.38.0
github.com/aws/aws-sdk-go-v2/config v1.31.0
github.com/aws/aws-sdk-go-v2/credentials v1.18.4
github.com/aws/aws-sdk-go-v2/service/redshift v1.57.0
github.com/aws/aws-sdk-go-v2/service/sts v1.37.0
github.com/hashicorp/terraform-plugin-docs v0.22.0
github.com/hashicorp/terraform-plugin-sdk/v2 v2.37.0
github.com/lib/pq v1.10.9
golang.org/x/net v0.42.0
github.com/mmichaelb/redshift-data-sql-driver v0.4.0
golang.org/x/net v0.43.0
)

require (
Expand All @@ -23,22 +24,23 @@ require (
github.com/Masterminds/semver/v3 v3.2.0 // indirect
github.com/Masterminds/sprig/v3 v3.2.3 // indirect
github.com/ProtonMail/go-crypto v1.1.6 // indirect
github.com/agext/levenshtein v1.2.2 // indirect
github.com/agext/levenshtein v1.2.3 // indirect
github.com/apparentlymart/go-textseg/v15 v15.0.0 // indirect
github.com/armon/go-radix v1.0.0 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.0 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.0 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.0 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.18.3 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.4.3 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.3 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.3 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.13.0 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.0 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.26.0 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.31.0 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.13.3 // indirect
github.com/aws/aws-sdk-go-v2/service/redshiftdata v1.36.0 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.28.0 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.33.0 // indirect
github.com/aws/smithy-go v1.22.5 // indirect
github.com/bgentry/speakeasy v0.1.0 // indirect
github.com/bmatcuk/doublestar/v4 v4.8.1 // indirect
github.com/cloudflare/circl v1.6.1 // indirect
github.com/fatih/color v1.16.0 // indirect
github.com/fatih/color v1.18.0 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/go-cmp v0.7.0 // indirect
github.com/google/uuid v1.6.0 // indirect
Expand All @@ -49,31 +51,31 @@ require (
github.com/hashicorp/go-cty v1.5.0 // indirect
github.com/hashicorp/go-hclog v1.6.3 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-plugin v1.6.3 // indirect
github.com/hashicorp/go-plugin v1.7.0 // indirect
github.com/hashicorp/go-retryablehttp v0.7.7 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/go-version v1.7.0 // indirect
github.com/hashicorp/hc-install v0.9.2 // indirect
github.com/hashicorp/hcl/v2 v2.23.0 // indirect
github.com/hashicorp/hcl/v2 v2.24.0 // indirect
github.com/hashicorp/logutils v1.0.0 // indirect
github.com/hashicorp/terraform-exec v0.23.0 // indirect
github.com/hashicorp/terraform-json v0.25.0 // indirect
github.com/hashicorp/terraform-plugin-go v0.27.0 // indirect
github.com/hashicorp/terraform-plugin-go v0.28.0 // indirect
github.com/hashicorp/terraform-plugin-log v0.9.0 // indirect
github.com/hashicorp/terraform-registry-address v0.2.5 // indirect
github.com/hashicorp/terraform-registry-address v0.3.0 // indirect
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
github.com/hashicorp/yamux v0.1.1 // indirect
github.com/hashicorp/yamux v0.1.2 // indirect
github.com/huandu/xstrings v1.3.3 // indirect
github.com/imdario/mergo v0.3.15 // indirect
github.com/mattn/go-colorable v0.1.14 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.9 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/go-testing-interface v1.14.1 // indirect
github.com/mitchellh/go-wordwrap v1.0.0 // indirect
github.com/mitchellh/go-wordwrap v1.0.1 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/oklog/run v1.0.0 // indirect
github.com/oklog/run v1.2.0 // indirect
github.com/posener/complete v1.2.3 // indirect
github.com/shopspring/decimal v1.3.1 // indirect
github.com/spf13/cast v1.5.0 // indirect
Expand All @@ -84,17 +86,17 @@ require (
github.com/yuin/goldmark-meta v1.1.0 // indirect
github.com/zclconf/go-cty v1.16.3 // indirect
go.abhg.dev/goldmark/frontmatter v0.2.0 // indirect
golang.org/x/crypto v0.40.0 // indirect
golang.org/x/crypto v0.41.0 // indirect
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df // indirect
golang.org/x/mod v0.25.0 // indirect
golang.org/x/mod v0.27.0 // indirect
golang.org/x/sync v0.16.0 // indirect
golang.org/x/sys v0.34.0 // indirect
golang.org/x/text v0.27.0 // indirect
golang.org/x/tools v0.34.0 // indirect
golang.org/x/sys v0.35.0 // indirect
golang.org/x/text v0.28.0 // indirect
golang.org/x/tools v0.36.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250218202821-56aae31c358a // indirect
google.golang.org/grpc v1.72.1 // indirect
google.golang.org/protobuf v1.36.6 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250811230008-5f3141c8851a // indirect
google.golang.org/grpc v1.74.2 // indirect
google.golang.org/protobuf v1.36.7 // indirect
gopkg.in/yaml.v2 v2.3.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
Loading
Loading