Closed rneacsu5 closed 2 months ago
Closes #38 and #119.
This PR adds a new resource called mysql_default_roles which allows you to set default rolest to users using the ALTER USER ... DEFAULT ROLE syntax.
mysql_default_roles
Example:
resource "mysql_role" "readonly" { name = "readonly" } resource "mysql_user" "jdoe" { user = "jdoe" host = "%" } resource "mysql_grant" "jdoe" { user = mysql_user.jdoe.user host = mysql_user.jdoe.host database = "" roles = [mysql_role.readonly.name] } resource "mysql_default_roles" "jdoe" { user = mysql_user.jdoe.user host = mysql_user.jdoe.host roles = mysql_grant.jdoe.roles }
I also added tests for this new resource and created a documentation page.
@petoju What do you think? Could you look over this PR? And thank you for keeping this provider alive!
This was released as a part of provider version 3.0.55.
Closes #38 and #119.
This PR adds a new resource called
mysql_default_roles
which allows you to set default rolest to users using the ALTER USER ... DEFAULT ROLE syntax.Example:
I also added tests for this new resource and created a documentation page.
@petoju What do you think? Could you look over this PR? And thank you for keeping this provider alive!