From 03b3f866fd80bbfbb706dc92bf83c7841db304d2 Mon Sep 17 00:00:00 2001 From: Alex English Date: Mon, 10 Aug 2026 17:43:32 -0700 Subject: [PATCH] Remove option_group_name so the RDS upgrade can apply default:postgres-15 does not exist -- AWS creates default option groups lazily, so naming it failed the apply with OptionGroupNotFoundFault. RDS assigns the family default itself when the attribute is absent. --- terraform/database.tf | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/terraform/database.tf b/terraform/database.tf index f7a5d02..7ab1c2b 100644 --- a/terraform/database.tf +++ b/terraform/database.tf @@ -17,6 +17,11 @@ resource "aws_db_parameter_group" "postgres15" { } } +# option_group_name is deliberately absent. Option groups do nothing for +# PostgreSQL, and AWS creates the default ones lazily -- naming +# "default:postgres-15" before it exists fails the apply with +# OptionGroupNotFoundFault. Leaving the attribute out lets RDS assign the +# family default itself during the major upgrade. Do not add it back. resource "aws_db_instance" "default" { allocated_storage = 100 allow_major_version_upgrade = true @@ -40,7 +45,6 @@ resource "aws_db_instance" "default" { instance_class = "db.t3.small" multi_az = false network_type = "IPV4" - option_group_name = "default:postgres-15" parameter_group_name = aws_db_parameter_group.postgres15.name port = 5432 publicly_accessible = true