petoju / terraform-provider-mysql

Terraform MySQL provider – unofficial fork
https://registry.terraform.io/providers/petoju/mysql
Mozilla Public License 2.0
73 stars 48 forks source link

Feature Request: mysql_procedure resource #59

Open wobo-mattmencel opened 1 year ago

wobo-mattmencel commented 1 year ago

Any chance a mysql_procedure resource could be added to this provider?

I've tested out doing this with a local-exec, but that method risks exposing passwords in the logs or in the STATE which I'm trying to avoid.

Affected Resource(s)

Please list the resources as a list, for example:

References

There is a postgres provider that implements a similar functionality. https://registry.terraform.io/providers/cyrilgdn/postgresql/latest/docs/resources/postgresql_function

petoju commented 1 year ago

There is a chance - if anyone sends out a PR of a reasonable quality, I'll merge it. I currently don't need it, so there is no plan to implement it from my side.

Flasheh commented 1 year ago

There's an undocumented mysql_sql resource which was created for this purpose. I've (ab)used it in the past to run some SQL statements though not with this fork of the provider.

Example usage can be found here: https://github.com/winebarrel/terraform-provider-mysql/pull/22

Use at your own risk obviously.