Skip to content

Commit b22fee0

Browse files
mars64jasonwalsh
authored andcommitted
feat: parameterize engine_version (#16)
1 parent e4e3b35 commit b22fee0

File tree

4 files changed

+16
-3
lines changed

4 files changed

+16
-3
lines changed

main.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ module "controllers" {
5252
boundary_release = var.boundary_release
5353
bucket_name = aws_s3_bucket.boundary.id
5454
desired_capacity = var.controller_desired_capacity
55+
engine_version = var.engine_version
5556
image_id = local.image_id
5657
instance_type = var.controller_instance_type
5758
key_name = var.key_name

modules/controller/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ module "postgresql" {
165165
backup_retention_period = 0
166166
backup_window = "03:00-06:00"
167167
engine = "postgres"
168-
engine_version = "12.4"
168+
engine_version = var.engine_version
169169
family = "postgres12"
170170
identifier = "boundary"
171171
instance_class = "db.t2.micro"

modules/controller/variables.tf

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,19 @@ variable "min_size" {
5656
type = number
5757
}
5858

59+
variable "engine_version" {
60+
default = "12.10"
61+
description = "The engine_version of the postgres db, within the postgres12 family"
62+
type = string
63+
}
64+
5965
variable "private_subnets" {
60-
description = "List of private subnets"
66+
description = "List of private subnet ids"
6167
type = list(string)
6268
}
6369

6470
variable "public_subnets" {
65-
description = "List of public subnets"
71+
description = "List of public subnet ids"
6672
type = list(string)
6773
}
6874

variables.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ variable "controller_min_size" {
3434
type = number
3535
}
3636

37+
variable "engine_version" {
38+
default = "12.10"
39+
description = "The engine_version of the postgres db, within the postgres12 family"
40+
type = string
41+
}
42+
3743
variable "key_name" {
3844
default = ""
3945
description = "The name of the key pair"

0 commit comments

Comments
 (0)