Skip to content

Commit

Permalink
explicitly set RDS cert to latest default for posterity
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsmejia committed Aug 21, 2024
1 parent 07d3759 commit f67ae5a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions infrastructure/database.tf
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# This file contains the configuration for the database and related resources.

data "aws_rds_certificate" "cert" {
id = "rds-ca-rsa2048-g1"
# This returns multiple certs and the aws provider throws an error.
# latest_valid_till = true
}

resource "aws_db_parameter_group" "postgres_parameters" {
name = "postgres-parameters-${var.user}-${var.stage}"
description = "Postgres Parameters ${var.user} ${var.stage}"
Expand Down Expand Up @@ -163,6 +169,8 @@ resource "aws_db_instance" "postgres_db" {
multi_az = true
publicly_accessible = true

ca_cert_identifier = data.aws_rds_certificate.cert.id

backup_retention_period = var.stage == "prod" ? "7" : "0"

tags = var.default_tags
Expand Down

0 comments on commit f67ae5a

Please sign in to comment.