-
Notifications
You must be signed in to change notification settings - Fork 70
Open
Description
Hello @petoju ,
I think we might have a problem here https://registry.terraform.io/providers/petoju/mysql/latest/docs/resources/grant from the example in the docs
resource "mysql_user" "jdoe" {
user = "jdoe"
host = "example.com"
plaintext_password = "password"
}
resource "mysql_grant" "jdoe" {
user = mysql_user.jdoe.user
host = mysql_user.jdoe.host
database = "app"
privileges = ["SELECT", "UPDATE"]
}
if let's say i try to change the user auth_plugin to something different, I get the plan to recreate only the user but not to recreate the grants so we will need to run terraform 2 times in this case which is not optimal. I think the issue is that the grants are relying on the name and the host no the user_id so in the grants, it should be a parameter user_id which can be the output of the previous mysql_user.jdoe.id and then it might work.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels