From e80996e2fbb2553efb18d858eedcb707d511c12c Mon Sep 17 00:00:00 2001 From: Naomi Trevino Date: Thu, 7 Mar 2024 14:15:37 -0500 Subject: [PATCH] add auto backups for db --- terraform/database-sql.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/terraform/database-sql.nix b/terraform/database-sql.nix index ecc7ebab..1288fe11 100644 --- a/terraform/database-sql.nix +++ b/terraform/database-sql.nix @@ -49,6 +49,11 @@ in { maintenance_window = "Tue:08:00-Tue:11:00"; }; + aws_db_instance_automated_backups_replication.default = { + source_db_instance_arn = "\${aws_db_instance.sql_database.arn}"; + retention_period = 14; + }; + aws_security_group_rule.sql_database_external = { type = "ingress"; security_group_id = "\${aws_security_group.nixos_test.id}";