Skip to content

Commit 3a7f5d0

Browse files
authored
chore(e2e): Allow AWS to select default db version (#6090)
Rather than hard-coding a version and needing to update this every time it becomes deprecated, we just pick the current default that AWS has set (which should be close to the latest).
1 parent 102c1fb commit 3a7f5d0

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

enos/modules/aws_boundary/rds.tf

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,18 @@ resource "aws_db_subnet_group" "boundary" {
66
subnet_ids = data.aws_subnets.infra.ids
77
}
88

9+
data "aws_rds_engine_version" "default" {
10+
engine = var.db_engine
11+
}
12+
913
resource "aws_db_instance" "boundary" {
1014
count = var.db_create == true ? 1 : 0
1115
identifier = "boundary-db-${random_string.cluster_id.result}"
1216
allocated_storage = var.db_storage
1317
storage_type = var.db_storage_type
1418
iops = var.db_storage_iops
15-
engine = var.db_engine
16-
engine_version = var.db_engine == "aurora-postgres" ? null : var.db_version
19+
engine = data.aws_rds_engine_version.default.engine
20+
engine_version = data.aws_rds_engine_version.default.version
1721
instance_class = var.db_class
1822
monitoring_interval = var.db_monitoring_interval
1923
monitoring_role_arn = var.db_monitoring_role_arn

enos/modules/aws_boundary/variables.tf

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -136,12 +136,6 @@ variable "db_class" {
136136
default = "db.t4g.small"
137137
}
138138

139-
variable "db_version" {
140-
description = "AWS RDS DBS engine version (for postgres/mysql)"
141-
type = string
142-
default = "15.7"
143-
}
144-
145139
variable "db_engine" {
146140
description = "AWS RDS DB engine type"
147141
type = string
@@ -406,4 +400,4 @@ variable "vault_transit_token" {
406400
description = "vault token used for kms transit in the boundary config"
407401
type = string
408402
default = ""
409-
}
403+
}

0 commit comments

Comments
 (0)