hashicorp / terraform-provider-mysql

Terraform MySQL provider – This Terraform provider is archived per our provider archiving process: https://terraform.io/docs/internals/archiving.html
https://www.terraform.io/docs/providers/mysql/
Mozilla Public License 2.0
61 stars 189 forks source link

Add sql resource #135

Closed winebarrel closed 4 years ago

winebarrel commented 4 years ago

Add a resource to execute the SQL as follows:


resource "mysql_sql" "create_procedure" {
  id         = "test.MY_PROCEDURE"
  create_sql = <<~EOT
CREATE PROCEDURE test.MY_PROCEDURE()
BEGIN
  SELECT 1;
END
EOT
  delete_sql = "DROP PROCEDURE test.MY_PROCEDURE"
}