From c95a6d385e3e3610542d1af07b8c71cd71649551 Mon Sep 17 00:00:00 2001 From: Marek Skrajnowski Date: Mon, 31 May 2021 16:56:25 +0200 Subject: [PATCH 1/3] feat(rds/postgres): updated postgres version --- rds/postgres/variables.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rds/postgres/variables.tf b/rds/postgres/variables.tf index e2065f18..95e4d355 100644 --- a/rds/postgres/variables.tf +++ b/rds/postgres/variables.tf @@ -67,7 +67,7 @@ variable "security_group_ids" { variable "postgres_version" { description = "RDS Postgres engine version" type = string - default = "10.13" + default = "10.15" } variable "storage" { From c4f34ebe269a4274b2e5c757546c98c6a4914128 Mon Sep 17 00:00:00 2001 From: Marek Skrajnowski Date: Mon, 31 May 2021 17:04:30 +0200 Subject: [PATCH 2/3] feat(rds/postgres): enable IAM authentication --- rds/postgres/main.tf | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/rds/postgres/main.tf b/rds/postgres/main.tf index 999906a1..891714c4 100644 --- a/rds/postgres/main.tf +++ b/rds/postgres/main.tf @@ -59,20 +59,21 @@ resource "aws_db_instance" "db" { identifier = local.name - engine = "postgres" - engine_version = var.postgres_version - storage_type = "gp2" - allocated_storage = var.storage - instance_class = var.instance_type - db_subnet_group_name = aws_db_subnet_group.db[0].name - multi_az = var.multi_az - deletion_protection = var.prevent_destroy - final_snapshot_identifier = "${local.name}-final" - vpc_security_group_ids = [aws_security_group.db[0].id] - publicly_accessible = var.public - backup_retention_period = var.backup_retention_period - copy_tags_to_snapshot = true - auto_minor_version_upgrade = false + engine = "postgres" + engine_version = var.postgres_version + storage_type = "gp2" + allocated_storage = var.storage + instance_class = var.instance_type + db_subnet_group_name = aws_db_subnet_group.db[0].name + multi_az = var.multi_az + deletion_protection = var.prevent_destroy + final_snapshot_identifier = "${local.name}-final" + vpc_security_group_ids = [aws_security_group.db[0].id] + publicly_accessible = var.public + backup_retention_period = var.backup_retention_period + copy_tags_to_snapshot = true + auto_minor_version_upgrade = false + iam_database_authentication_enabled = true port = var.port name = local.db From f943ac9913c254f5b58524d6d6d796215c4cd128 Mon Sep 17 00:00:00 2001 From: Marek Skrajnowski Date: Mon, 31 May 2021 18:03:29 +0200 Subject: [PATCH 3/3] docs(rds/postgres): updated readme --- rds/postgres/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rds/postgres/README.md b/rds/postgres/README.md index fc85b7ab..feeaab7b 100644 --- a/rds/postgres/README.md +++ b/rds/postgres/README.md @@ -47,7 +47,7 @@ Creates an RDS PostgreSQL database instance | [multi\_az](#input\_multi\_az) | Specifies if the RDS instance is multi-AZ | `bool` | `true` | no | | [password](#input\_password) | Password for the master DB user | `string` | n/a | yes | | [port](#input\_port) | The port on which the DB accepts connections | `number` | `5432` | no | -| [postgres\_version](#input\_postgres\_version) | RDS Postgres engine version | `string` | `"10.13"` | no | +| [postgres\_version](#input\_postgres\_version) | RDS Postgres engine version | `string` | `"10.15"` | no | | [prevent\_destroy](#input\_prevent\_destroy) | Should the DB be protected from accidental deletion | `bool` | `true` | no | | [project](#input\_project) | Kebab-cased project name | `string` | n/a | yes | | [public](#input\_public) | Should the DB be publicly accessible, will have no effect if placed in a private subnet | `bool` | `false` | no |