brainly/terraform-provider-redshift

Issue with revoking privileges while droping user

vitoravancini opened this issue · 1 comments

Hello,

it seems that when deleting an user there is a query revoking privileges using cascade, which redshift seems to don't accept.
this is the query:

if _, err := tx.Exec(fmt.Sprintf("ALTER DEFAULT PRIVILEGES IN SCHEMA %s REVOKE ALL ON TABLES FROM %s CASCADE", pq.QuoteIdentifier(schemaName), pq.QuoteIdentifier(userName))); err != nil {

which retries until terraform exits successfully without actually droping the users.

removing cascade worked for me.
Id be happy to submit a pull request if thats ok with you.

Fixed with #47 and released in v0.5.2