Skip to content

Commit

Permalink
add mysql database support (#77)
Browse files Browse the repository at this point in the history
* add mysql database support

* fix ci pre-commit
  • Loading branch information
pgvishnuram authored Aug 2, 2024
1 parent d9bcc16 commit afb3b41
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion terraform/db.tf
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,10 @@ resource "google_sql_database_instance" "instance" {
private_network = google_compute_network.core.self_link
}


backup_configuration {
enabled = true
enabled = true
binary_log_enabled = (local.db_engine == "mysql") ? true : false
}

dynamic "database_flags" {
Expand Down
4 changes: 4 additions & 0 deletions terraform/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ locals {
? random_string.postgres_airflow_password != [] ? random_string.postgres_airflow_password[0].result : ""
: var.postgres_airflow_password
)

db_engine = lower(split("_", var.db_version)[0])


core_network_id = format(
"projects/%s/global/networks/%s",
google_compute_network.core.project,
Expand Down

0 comments on commit afb3b41

Please sign in to comment.