locals.tf
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# locals =====================================================================

locals {
  tags = merge(
    {
      ManagedBy = "terraform"
      Module    = "database/dynamodb"
    },
    var.tags,
  )

  tables_with_autoscaling = {
    for k, v in var.tables : k => v
    if v.autoscaling != null && v.billing_mode == "PROVISIONED"
  }
}