terraform-provider-mysql icon indicating copy to clipboard operation
terraform-provider-mysql copied to clipboard

Feature Request: mysql_procedure resource

Open wobo-mattmencel opened this issue 2 years ago • 2 comments

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:

  • mysql_procedure

References

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

wobo-mattmencel avatar Jan 30 '23 22:01 wobo-mattmencel

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.

petoju avatar Jan 31 '23 06:01 petoju

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.

Flasheh avatar May 24 '23 11:05 Flasheh