Skip to content
This repository has been archived by the owner on Jan 12, 2021. It is now read-only.

REVOKE ALL on AWS RDS instances #19

Open
krogon-dp opened this issue Oct 19, 2017 · 7 comments
Open

REVOKE ALL on AWS RDS instances #19

krogon-dp opened this issue Oct 19, 2017 · 7 comments

Comments

@krogon-dp
Copy link

Hi, Is there any specific reason this provider uses REVOKE ALL statement?

https://github.com/terraform-providers/terraform-provider-mysql/blob/master/mysql/resource_grant.go#L120

Once this command is OK when used with specified database name, RDS does not like this when used with * all databases.

mysql> grant all on test.* to 'aaa'@'%';
Query OK, 0 rows affected (0.05 sec)

mysql> revoke all on test.* from 'aaa'@'%';
Query OK, 0 rows affected (0.04 sec)

mysql> grant select on *.* to 'aaa'@'%';
Query OK, 0 rows affected (0.04 sec)

mysql> grant all on *.* to 'aaa'@'%';
ERROR 1045 (28000): Access denied for user 'rdstest'@'%' (using password: YES)

Why not to remove the same privileges that resource is holding?

@krogon-dp krogon-dp changed the title REVOKE ALL on RDS instances REVOKE ALL on AWS RDS instances Oct 19, 2017
krogon-dp added a commit to krogon-dp/terraform-provider-mysql that referenced this issue Oct 20, 2017
@cemo
Copy link

cemo commented May 16, 2018

@katbyte We hit same issue. Would you please review commit at krogon-dp@eed09ba?

@jgpdc4u
Copy link

jgpdc4u commented Aug 23, 2018

We had this same issue as well. That commit looks like a great solution. LGTM!

@damascenorakuten
Copy link

+1. I opened this issue as well.

@RTodorov
Copy link

Facing the same problem.....

@robertomczak
Copy link

+1 Any plan of releasing Fixes terraform-providers#19 … ?

@martin-walsh
Copy link
Contributor

This issue still exists and is a blocker to any editing grants or removing any user on AWS RDS/Aurora databases.

The root of the issue is REVOKE ALL is not allowed and should be replaced by a comma separated list.

It should be noted that REVOKE ALL also interferes with multiple resource "mysql_grant" on the same level.

@martin-walsh
Copy link
Contributor

Potential fix: #73

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants