-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Root object was present, but now absent. on mysql_grant #169
Comments
It seems here that the table for which the grant is created contains uppercase and lowercase - so the provider doesn't match it to the grant returned by mysql, that is normalized just to lowercase. Workaround for now: use just lowercase DB names. |
That was it! 😮💨 - I didn't even realize. The database name variable is a variable used in several non-database components in my system too - looks like if I want consistency across my system I need to make sure that it is always lowercase. No big deal - its still early. I read up on this https://dev.mysql.com/doc/refman/8.0/en/identifier-case-sensitivity.html it seems like a straightforward check to see the value of If if If Logic I think would be straitforward but to test it one would need to have three db's one with each condition. or - just always convert everything to lowercase no matter what. What do you think the best approach is @petoju ? - if its an easier approach i can attempt to get a PR together... |
@williamohara So we could initialize it once and save it to something like OneConnection. And then just check it from there. |
I've just encountered this same error when attempting to create a grant like this:
I wonder if it's because the Update: confirmed, MySQL returns the host as
|
Provider version
Run
terraform -v
You can find the latest version mentioned here: https://registry.terraform.io/providers/petoju/mysql/latest
MySQL version and settings
Azure Flexible MySQL configured in terraform as below. (Notice the SQL mode configs)
Terraform Configuration Files
See above for server config- all one needs to do is change the variable names and set to their azure account.
Debug Output
creds cleaned...
https://gist.github.com/williamohara/924b7c3a58f809beeaf790b9e6f5d0b2
Panic Output
None
Expected Behavior
No error - grants given to user
Actual Behavior
Steps to Reproduce
Please list the steps required to reproduce the issue, for example:
terraform apply
Important Factoids
Are there anything atypical about your accounts that we should know? For example: Running in EC2 Classic? Custom version of OpenStack? Tight ACLs?
I am using terragurnt
References
I don't think so
The text was updated successfully, but these errors were encountered: