-
Notifications
You must be signed in to change notification settings - Fork 51
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
Don't connect to MySQL Instance when the provider is instantiated #25
Comments
This issue prevents a simple plan too - if your terraform creates a database instance and then uses this provider to work with the new database instance, the plan fails because this provider tries to connect to the instance that doesn't exist. |
We could do it now as I understand the rationale. Database could be connected to lazily in resources. It needs some locking, but it can be done. Bear in mind it brings something (it works with RDS when provisioned specially), but brings a bit of WTF moment - one can make a provider, that seems to work until a resource is created. |
@RyanW8 @snolan-amount could you test it now? Provider 3.0.20 could behave better. It still needs some testing - while it passed the integration test, I am afraid there could be more issues with it. |
Thanks @petoju we've now switched to using this MySQL provider, haven't encountered any issues yet. Thanks! |
Hey we're looking to migrate to this provider away from the deprecated https://github.com/hashicorp/terraform-provider-mysql. However we've hit a bit of a roadblock. This provider seems to attempt to connect to the MySQL instance when the provider is instantiated which is causing problems for us.
We have a wrapper module that allows us to create AWS RDS instances of various engine types (postgres, mysql etc), in this module we declare the MySQL provider so that MySQL engine types can create users; this is causing problems for postgres engine types as obviously the provider won't work. Is it possible to move the connecting to the MySQL instance into the specific resources like it did in the old provider?
The text was updated successfully, but these errors were encountered: