From c465f0939c726bcec237d438426c673b70a30034 Mon Sep 17 00:00:00 2001 From: "Michael B. Klein" Date: Tue, 4 Jun 2024 15:02:09 +0000 Subject: [PATCH] Give EventBridge permission to call DB Maintenance lambda --- data_services/postgres.tf | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/data_services/postgres.tf b/data_services/postgres.tf index 0bca618..826b14d 100644 --- a/data_services/postgres.tf +++ b/data_services/postgres.tf @@ -104,8 +104,16 @@ module "maintenance_lambda" { runtime = "python3.10" source_path = "${path.module}/db_maintenance" timeout = 600 + publish = true vpc_subnet_ids = module.core.outputs.vpc.public_subnets.ids vpc_security_group_ids = [aws_security_group.db_client.id] attach_network_policy = true + + allowed_triggers = { + DBMaintenanceRule = { + + principal = "events.amazonaws.com" + } + } }