postmodern.

Pattern 08

DynamoDB Global Table

Reusable DynamoDB table with optional DR replica, GSIs, encryption, PITR, TTL, and migration-safe adoption.

Status

Available module

Deployment scope

Primary + DR ready

Recommended version

~> 1.0

What you get

01

Primary + replica

Create a regional table with an optional cross-region replica.

02

Schema flexibility

Define hash/range keys and optional GSIs for your access patterns.

03

Data protection

Use PITR, TTL, deletion protection, and SSE without custom resources.

Start here

Add the module to your configuration and customize only what you need.

main.tf
module "transactions_table" {
  source = "pomo-studio/dynamodb-global-table/aws"
  version = "~> 1.0"

  name       = "my-app-transactions"
  hash_key   = "tenant_id"
  attributes = [{ name = "tenant_id", type = "S" }]
  enable_dr  = true
}

Key inputs

  • name
  • hash_key
  • attributes
  • global_secondary_indexes
  • enable_dr
  • enable_pitr

Useful outputs

  • table_name_primary
  • table_arn_primary
  • table_stream_arn_primary
  • replica_enabled

Built with

  • DynamoDB
  • Global Tables
  • KMS
  • PITR
  • Terraform