mirror of
https://github.com/Sea-Haven-Industries/meal-order-manager.git
synced 2026-09-30 06:33:12 +00:00
* feat(infra): add lightweight meal-order-manager-dev (PLAT-210) Parameterize the HCP root for seahaven-dev with schedules, PITR, alarms, and Paychex gated off so a second env does not clone production cost or side effects. * fix(infra): drop prod-only authorizer import so dev can create it (PLAT-210) The PLAT-102 import is already in meal-order-manager-prod state. A shared import block fails in seahaven-dev because the permission does not exist there. * fix(iam): allow creating the weekly-menu githubdeploy role in seahaven-dev (PLAT-210) Prod imported that role. A new account needs CreateRole on tf-managed/githubdeploy-meal-order-manager-weekly-menu.
39 lines
976 B
HCL
39 lines
976 B
HCL
# Single-table store for orders, roster entries and weekly settings.
|
|
#
|
|
# Deletion protection and point-in-time recovery are on in prod: this table
|
|
# holds the only copy of submitted orders, and a rebuild would lose payroll
|
|
# history. Dev is disposable (PITR and deletion protection off).
|
|
# lifecycle.prevent_destroy cannot interpolate, so it stays true in both
|
|
# environments. Destroy a leftover dev table from the AWS console after
|
|
# setting deletion_protection_enabled = false in a follow-up apply.
|
|
resource "aws_dynamodb_table" "orders" {
|
|
name = local.table_name
|
|
billing_mode = "PAY_PER_REQUEST"
|
|
hash_key = "PK"
|
|
range_key = "SK"
|
|
|
|
deletion_protection_enabled = local.is_prod
|
|
|
|
attribute {
|
|
name = "PK"
|
|
type = "S"
|
|
}
|
|
|
|
attribute {
|
|
name = "SK"
|
|
type = "S"
|
|
}
|
|
|
|
ttl {
|
|
attribute_name = "ttl"
|
|
enabled = true
|
|
}
|
|
|
|
point_in_time_recovery {
|
|
enabled = local.is_prod
|
|
}
|
|
|
|
lifecycle {
|
|
prevent_destroy = true
|
|
}
|
|
}
|