Skip to content

Commit 474f9e8

Browse files
committed
feat: change postgres version to variable
1 parent c7c8c34 commit 474f9e8

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ resource "google_sql_database_instance" "tamr" {
1010
project = var.project_id
1111
region = var.region
1212
# NOTE: this is pinned as its the version that tamr needs
13-
database_version = "POSTGRES_12"
13+
database_version = var.postgres_version
1414

1515
deletion_protection = var.deletion_protection
1616

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,3 +118,9 @@ variable "ssl_mode" {
118118
description = "Set up the SSL mode. If SSL is required, this value is TRUSTED_CLIENT_CERTIFICATE_REQUIRED."
119119
default = "ALLOW_UNENCRYPTED_AND_ENCRYPTED"
120120
}
121+
122+
variable "postgres_version" {
123+
type = string
124+
description = "Version of Postgres to install on the CloudSQL instance"
125+
default = "POSTGRES_12"
126+
}

0 commit comments

Comments
 (0)