From daf7683eac987ed28d5bcf7073c28aaf0dc65259 Mon Sep 17 00:00:00 2001 From: Johnny Morano Date: Wed, 19 Nov 2025 13:30:28 +0000 Subject: [PATCH] feat: Add dependencies for autoscaled DynamoDB tables --- main.tf | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/main.tf b/main.tf index 54636e0..883167a 100644 --- a/main.tf +++ b/main.tf @@ -327,6 +327,11 @@ resource "aws_dynamodb_table" "autoscaled" { lifecycle { ignore_changes = [read_capacity, write_capacity] } + + depends_on = [ + aws_appautoscaling_target.table_read, + aws_appautoscaling_target.table_write, + ] } resource "aws_dynamodb_table" "autoscaled_gsi_ignore" { @@ -425,6 +430,11 @@ resource "aws_dynamodb_table" "autoscaled_gsi_ignore" { lifecycle { ignore_changes = [global_secondary_index, read_capacity, write_capacity] } + + depends_on = [ + aws_appautoscaling_target.table_read, + aws_appautoscaling_target.table_write, + ] } resource "aws_dynamodb_resource_policy" "this" {