Skip to content

Commit b87b043

Browse files
committed
updates per pr review
Signed-off-by: Rui Chen <rui@chenrui.dev>
1 parent 5dfc034 commit b87b043

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

mysql/resource_grant.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -432,10 +432,6 @@ func parseResourceFromData(d *schema.ResourceData) (MySQLGrant, diag.Diagnostics
432432

433433
// Step 2: Get generic attributes
434434
database := d.Get("database").(string)
435-
if database == "" {
436-
// treat an empty value as a request for global privileges
437-
database = "*"
438-
}
439435
tlsOption := d.Get("tls_option").(string)
440436
grantOption := d.Get("grant").(bool)
441437

website/docs/r/grant.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ The following arguments are supported:
7474
* `user` - (Optional) The name of the user. Conflicts with `role`.
7575
* `host` - (Optional) The source host of the user. Defaults to "localhost". Conflicts with `role`.
7676
* `role` - (Optional) The role to grant `privileges` to. Conflicts with `user` and `host`.
77-
* `database` - (optional) The database to grant privileges on.
77+
* `database` - (Optional) The database to grant privileges on. Defaults to `*`, which is all databases.
7878
* `table` - (Optional) Which table to grant `privileges` on. Defaults to `*`, which is all tables.
7979
* `privileges` - (Optional) A list of privileges to grant to the user. Refer to a list of privileges (such as [here](https://dev.mysql.com/doc/refman/5.5/en/grant.html)) for applicable privileges. Conflicts with `roles`.
8080
* `roles` - (Optional) A list of roles to grant to the user. Conflicts with `privileges`.

0 commit comments

Comments
 (0)