Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added import docs and warning to privilege description #41

Merged
merged 1 commit into from
Jan 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
8 changes: 8 additions & 0 deletions docs/resources/group.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,12 @@ resource "redshift_group" "staff" {
- **id** (String) The ID of this resource.
- **users** (Set of String) List of the user names to add to the group

## Import

Import is supported using the following syntax:

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

terraform import redshift_group.mygroup 234
```
3 changes: 3 additions & 0 deletions docs/resources/privilege.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@
page_title: "redshift_privilege Resource - terraform-provider-redshift"
subcategory: ""
description: |-
!> WARNING: This resource is deprecated, might have bugs and may not be working as expected. Please use redshiftgrant and redshiftdefault_privilege instead.
When you create a database object, you are its owner. By default, only a superuser or the owner of an object can query, modify, or grant privileges on the object. For users to use an object, you must grant the necessary privileges to the user or the group that contains the user. Database superusers have the same privileges as database owners.
---

# redshift_privilege (Resource)

!> **WARNING:** This resource is deprecated, might have bugs and may not be working as expected. Please use redshift_grant and redshift_default_privilege instead.

When you create a database object, you are its owner. By default, only a superuser or the owner of an object can query, modify, or grant privileges on the object. For users to use an object, you must grant the necessary privileges to the user or the group that contains the user. Database superusers have the same privileges as database owners.

## Example Usage
Expand Down
8 changes: 8 additions & 0 deletions docs/resources/user.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,12 @@ resource "redshift_user" "user_with_unrestricted_syslog" {
- **syslog_access** (String) A clause that specifies the level of access that the user has to the Amazon Redshift system tables and views. If `RESTRICTED` (default) is specified, the user can see only the rows generated by that user in user-visible system tables and views. If `UNRESTRICTED` is specified, the user can see all rows in user-visible system tables and views, including rows generated by another user. `UNRESTRICTED` doesn't give a regular user access to superuser-visible tables. Only superusers can see superuser-visible tables.
- **valid_until** (String) Sets a date and time after which the user's password is no longer valid. By default the password has no time limit.

## Import

Import is supported using the following syntax:

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

terraform import redshift_user.mememe 123
```
3 changes: 3 additions & 0 deletions examples/resources/redshift_group/import.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Import group with grosysid: SELECT grosysid FROM pg_group WHERE groname = 'mygroup'

terraform import redshift_group.mygroup 234
3 changes: 3 additions & 0 deletions examples/resources/redshift_user/import.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Import user with usesysid: SELECT usesysid FROM pg_user_info WHERE usename = 'mememe'

terraform import redshift_user.mememe 123
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/aws/aws-sdk-go-v2/config v1.4.1
github.com/aws/aws-sdk-go-v2/service/redshift v1.8.0
github.com/aws/aws-sdk-go-v2/service/sts v1.5.0
github.com/hashicorp/terraform-plugin-docs v0.4.0
github.com/hashicorp/terraform-plugin-docs v0.5.1
github.com/hashicorp/terraform-plugin-sdk/v2 v2.10.1
github.com/lib/pq v1.10.2
golang.org/x/net v0.0.0-20210326060303-6b1517762897
Expand Down Expand Up @@ -66,8 +66,8 @@ require (
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/jstemmer/go-junit-report v0.9.1 // indirect
github.com/klauspost/compress v1.11.2 // indirect
github.com/mattn/go-colorable v0.1.8 // indirect
github.com/mattn/go-isatty v0.0.12 // indirect
github.com/mattn/go-colorable v0.1.11 // indirect
github.com/mattn/go-isatty v0.0.14 // indirect
github.com/mitchellh/cli v1.1.2 // indirect
github.com/mitchellh/copystructure v1.2.0 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
Expand All @@ -80,13 +80,13 @@ require (
github.com/russross/blackfriday v1.6.0 // indirect
github.com/ulikunitz/xz v0.5.8 // indirect
github.com/vmihailenco/msgpack v4.0.4+incompatible // indirect
github.com/zclconf/go-cty v1.9.1 // indirect
github.com/zclconf/go-cty v1.10.0 // indirect
go.opencensus.io v0.22.4 // indirect
golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e // indirect
golang.org/x/lint v0.0.0-20200302205851-738671d3881b // indirect
golang.org/x/mod v0.3.0 // indirect
golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d // indirect
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1 // indirect
golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6 // indirect
golang.org/x/text v0.3.5 // indirect
golang.org/x/tools v0.0.0-20200713011307-fd294ab11aed // indirect
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 // indirect
Expand Down
Loading