Closed holms closed 2 months ago
I believe the issue is with refresh and your DB version. Consider running with -refresh=false temporarily to verify.
And logs from provider (created as a part of other logs) would also help - see https://developer.hashicorp.com/terraform/internals/debugging for detail on how to enable them.
I've ran into the same issue as well. I believe the docs are just a bit misleading here as they claim For grants without explicit database or tables, leave these fields empty.
but the code appears to always exactly match db/table when importing, thus leaving fields blank doesn't work. This is also a bit confusing because terraform claims the import was successful. But when taking a look into the state file (or running terraform state list
) nothing really happened
Running terraform import mysql_grant.testgrant testuser@%@testdb@*
seems to have worked perfectly fine for me to import grants
After importing mysql_grant resource successfully it's still asking to create new resource
Terraform Version
Affected Resource(s)
Terraform Configuration Files
Expected Behavior
After import it shouldn't create new resource
Actual Behavior
Asks to create new resource despite import been successful
Steps to Reproduce
terraform import mysql_grant.api_scriptgenerator_useraccess_pbs_accounts api_scriptgenerator@%@pbs_accounts@@
terraform apply