Skip to content

Commit

Permalink
added postgres 17 in example
Browse files Browse the repository at this point in the history
  • Loading branch information
imrannayer committed Nov 1, 2024
1 parent 4a536d4 commit a7eaff3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions examples/postgresql-with-cross-region-failover/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ module "pg1" {
name = var.pg_name_1
random_instance_name = true
project_id = var.project_id
database_version = "POSTGRES_14"
database_version = "POSTGRES_17"
region = local.region_1

edition = local.edition
Expand Down Expand Up @@ -164,7 +164,7 @@ module "pg2" {
name = var.pg_name_2
random_instance_name = true
project_id = var.project_id
database_version = "POSTGRES_14"
database_version = "POSTGRES_17"
region = local.region_2

edition = local.edition
Expand Down
2 changes: 1 addition & 1 deletion modules/postgresql/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ variable "database_version" {

validation {
condition = (length(var.database_version) >= 9 && ((upper(substr(var.database_version, 0, 9)) == "POSTGRES_") && can(regex("^\\d+(?:_?\\d)*$", substr(var.database_version, 9, -1))))) || can(regex("^\\d+(?:_?\\d)*$", var.database_version))
error_message = "The specified database version is not a valid representaion of database version. Valid database versions should be like the following patterns:- \"9_6\", \"postgres_9_6\", \"POSTGRES_14\" or \"POSTGRES_15\""
error_message = "The specified database version is not a valid representation of database version. Valid database versions should be like the following patterns:- \"9_6\", \"postgres_9_6\", \"POSTGRES_14\", \"POSTGRES_15\", \"POSTGRES_17\" or \"POSTGRES_17\""
}
}

Expand Down

0 comments on commit a7eaff3

Please # to comment.