You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mysql provider grants my-user listed privileges on all tables apart from table-a.
Actual Behavior
terraform apply fails with error:
mysql_grant.revoke_my-user_access_to_table-a: Creating...
╷
│ Error: Error running SQL (GRANT ON `my-db`.`table-a` TO 'my-user'@'%'): Error 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ON `my-db`.`table-a` TO 'my-user'@'%'' at line 1
Steps to Reproduce
terraform apply
References
To achieve this currently I'd need to create a list of all tables and create "mysql_grant" for each of them (like in #179), with customized privileges for the exceptional table.
The text was updated successfully, but these errors were encountered:
What we should do is handle this properly - warn soon about the issue.
However, we're trying to enforce import everywhere. Without import, running provider may be dangerous as it may remove some already existing privileges not managed by provider yet.
For now, I believe the best idea is to import resources with grants for all the tables (like in #179).
It would be useful if having an empty list for
privileges
inmysql_grant
would revoke all privileges (if exist) for a given user, database and table.Alternatively, a new resource named like e.g.
mysql_revoke
should be introduced to complement the existingmysql_grant
.Provider version
3.0.65
MySQL version and settings
8.0
Terraform Configuration Files
I tried to grant user some privileges on all tables apart from one:
Expected Behavior
mysql provider grants
my-user
listed privileges on all tables apart fromtable-a
.Actual Behavior
terraform apply
fails with error:Steps to Reproduce
terraform apply
References
To achieve this currently I'd need to create a list of all tables and create "mysql_grant" for each of them (like in #179), with customized privileges for the exceptional table.
The text was updated successfully, but these errors were encountered: