petoju / terraform-provider-mysql

Terraform MySQL provider – unofficial fork
https://registry.terraform.io/providers/petoju/mysql
Mozilla Public License 2.0
63 stars 40 forks source link

Make database optional in grant resource #69

Open ClemontX opened 1 year ago

ClemontX commented 1 year ago

Hey guys,

i don't have much experience with go and in developing terraform providers. I wanted to use this provider to create a simple privilige management. I've discovered the problem that if you want to grant a role to a user, you must define a database for the grant resource. This isn't needed by the latest mysql and mariadb versions (tested). A sample in the MariaDB documentation is here.

So i changed the line in the code which declares the database as required and changed it to optional.

I hope i did everything the right way.

Greets Carl