Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions examples/standalone-infra/postgres.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions examples/standalone-infra/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down
Loading