diff --git a/examples/standalone-infra/postgres.tf b/examples/standalone-infra/postgres.tf index fa96fc1..900587d 100644 --- a/examples/standalone-infra/postgres.tf +++ b/examples/standalone-infra/postgres.tf @@ -10,6 +10,7 @@ resource "google_sql_database_instance" "main" { settings { tier = var.postgres_tier + edition = "ENTERPRISE_PLUS" disk_size = var.postgres_disk_size_gb disk_autoresize = true @@ -25,6 +26,16 @@ resource "google_sql_database_instance" "main" { enabled = true start_time = "03:00" } + + database_flags { + name = "cloudsql.enable_index_advisor" + value = "on" + } + + database_flags { + name = "deadlock_timeout" + value = "1000" + } } deletion_protection = false diff --git a/examples/standalone-infra/variables.tf b/examples/standalone-infra/variables.tf index 52ca004..1dc2af6 100644 --- a/examples/standalone-infra/variables.tf +++ b/examples/standalone-infra/variables.tf @@ -16,9 +16,9 @@ variable "name" { } variable "postgres_tier" { - description = "Cloud SQL machine tier (db-custom-VCPU-RAM_MB)" + description = "Cloud SQL machine tier (Enterprise Plus requires db-perf-optimized-N-*)" type = string - default = "db-custom-1-3840" + default = "db-perf-optimized-N-2" } variable "postgres_disk_size_gb" {