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

Resource for tidb dynamic config #15

Closed borissavelev closed 1 year ago

borissavelev commented 2 years ago

It's not an issue but I'd like to have a consultation before writing code) There is a TiDB which is 99% compatible with MySQL. TiDB has extension to manage configuration dynamicaly https://docs.pingcap.com/tidb/stable/dynamic-config the same way as global variables (with SQL)

What do you think about having another resource type mysql_tidb_config with semantic

type = "ENUM('pd', 'tikv')"
name = "string"
value = "string"

and example usage like:

resource "mysql_tidb_config" "this" {
  type = "pd"
  name = "log.level"
  value = "info"
}
petoju commented 2 years ago

It doesn't add any dependency and it looks good enough.

For discoverability, it would be better if TiDB had its own provider - that said, I'm fine with merging the change you're suggesting as long as it fulfills quality standards (tests, docs).