Closed otherchen closed 3 months ago
I am able to reproduce this error. I believe it has to do with the combination of ALL PRIVILEGES
+ GRANT OPTION
:
Ordinarily, it is valid syntax to REVOKE <PRIVILEGE>, GRANT OPTION
. For instance:
This is not the case with REVOKE ALL, GRANT OPTION
. For instance:
The current resource_grant
implementation doesn't take this edge case into consideration, it blindly applies GRANT OPTION
:
https://github.com/petoju/terraform-provider-mysql/blob/master/mysql/resource_grant.go#L181
This is also not covered by existing test cases. There are test cases for ALL PRIVILEGES
and for GRANT OPTION
, but none for the intersection of the two features.
I have a PR which adds test cases for this edge case, as well as fixes the cause of the bug:
Thanks for the fix - I'm working on releasing this. However, my signing cert is stored on HW token and I found out new kernel doesn't recognize it correctly. I'll do my best to resolve this ASAP.
This was released in 3.0.49.
(It turned out the new kernel doesn't work well with pcscd, restarting it helped at least temporarily)
Hi there,
Thank you for opening an issue. Please note that we try to keep the Terraform issue tracker reserved for bug reports and feature requests. For general usage questions, please see: https://www.terraform.io/community.html.
Terraform Version
Run
terraform -v
to show the version. If you are not running the latest version of Terraform, please upgrade because your issue may have already been fixed.Affected Resource(s)
Please list the resources as a list, for example:
If this issue appears to affect multiple resources, it may be an issue with Terraform's core, so please mention this.
Terraform Configuration Files
Debug Output
Panic Output
If Terraform produced a panic, please provide a link to a GitHub Gist containing the output of the
crash.log
.Expected Behavior
What should have happened?
We should have been able to delete the mysql_grant with
ALL_PRIVILEGES
set.Actual Behavior
What actually happened?
We are unable to delete the
mysql_grant
withALL_PRIVILEGES
and get the error pasted above.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?
References
Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example: