Merge pull request #184 from Sea-Haven-Industries/feature/wo-pascalcase-destroy

chore(infra): destroy PascalCase WO Dynamo tables (PLAT-11)
This commit is contained in:
Adam Moussa 2026-08-14 11:51:53 -04:00 • committed by GitHub
commit 005c923f83
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 9 additions and 75 deletions

View file

@ -272,15 +272,13 @@ The `purchase-orders` DynamoDB table is **owned by this repo's Terraform config*
### `work-orders` and `work-order-comments` tables (owned here)
> **PLAT-11 cutover complete 2026-08-07.** Live physical names are kebab-case.
> PascalCase `WorkOrders` / `WorkOrderComments` retained until ≥24h soak ends
> (**ready 2026-08-08T18:16Z**), then destroyed under HCP. GitHub #24 superseded
> (issues disabled on this repo); track [PLAT-11](https://seahaven.atlassian.net/browse/PLAT-11).
> **PLAT-11 cutover complete 2026-08-07; PascalCase tables destroyed in Phase 3.**
> Live physical names are kebab-case. GitHub #24 superseded (issues disabled on
> this repo); track [PLAT-11](https://seahaven.atlassian.net/browse/PLAT-11).
> freeze cutover in [`docs/plat-11/cutover-runbook.md`](docs/plat-11/cutover-runbook.md).
> After cutover, this section will name the kebab tables.
> Cutover record: [`docs/plat-11/cutover-runbook.md`](docs/plat-11/cutover-runbook.md).
Both tables are **owned by this repo's Terraform config** (`terraform/wo_ddb.tf`, retain lifecycle):
Both tables are **owned by this repo's Terraform config** (`terraform/wo_ddb.tf`, `prevent_destroy` on kebab tables):
- `work-orders` — PK `work_order_id` (S).
- `work-order-comments` — PK `work_order_id` (S), SK `comment_id` (S).

View file

@ -81,14 +81,12 @@ Record `FREEZE_START` (UTC ISO-8601) before step 1.
```
And/or one SHOC reconciliation pass against procurement-api.
## Phase 3 — Decommission (after ≥24h on kebab; ready **2026-08-08T18:16Z**)
## Phase 3 — Decommission (DONE after ≥24h kebab soak; ready was **2026-08-08T18:16Z**)
1. Lift `prevent_destroy` on **legacy** `work_orders` / `work_order_comments` only.
1. Lift `prevent_destroy` on **legacy** `work_orders` / `work_order_comments` only. Done (#176).
2. Remove legacy table resources + their import blocks + PascalCase alarm imports.
3. HCP apply (destroys PascalCase tables).
4. Update README + Confluence Architecture Map; note GitHub #24 superseded on PLAT-11.
5. Close PLAT-11 acceptance criteria.
## Rollback (before decommission)
Point env + ESMs back at PascalCase tables via TF; HCP apply. Legacy tables still hold data until Phase 3.
Rollback of Phase 3 is not available: PascalCase tables are gone. Live traffic is kebab-only.

View file

@ -17,16 +17,6 @@ import {
id = "pending-site-review"
}
import {
to = aws_dynamodb_table.work_orders
id = "WorkOrders"
}
import {
to = aws_dynamodb_table.work_order_comments
id = "WorkOrderComments"
}
# PLAT-11 kebab tables — created out-of-band then imported after HCP CreateTable
# IAM pin widened (hcptf-procurement-ingest lacked kebab ARNs on first apply).
import {

View file

@ -1,56 +1,4 @@
# PLAT-11: live WO tables are kebab-case. PascalCase WorkOrders /
# WorkOrderComments retained until ≥24h soak; prevent_destroy lifted for
# the follow-up destroy apply (ready 2026-08-08T18:16Z).
resource "aws_dynamodb_table" "work_orders" {
name = "WorkOrders"
billing_mode = "PAY_PER_REQUEST"
hash_key = "work_order_id"
attribute {
name = "work_order_id"
type = "S"
}
stream_enabled = true
stream_view_type = "NEW_AND_OLD_IMAGES"
tags = {
Plat11 = "legacy-pending-destroy"
}
lifecycle {
prevent_destroy = false
}
}
resource "aws_dynamodb_table" "work_order_comments" {
name = "WorkOrderComments"
billing_mode = "PAY_PER_REQUEST"
hash_key = "work_order_id"
range_key = "comment_id"
attribute {
name = "work_order_id"
type = "S"
}
attribute {
name = "comment_id"
type = "S"
}
stream_enabled = true
stream_view_type = "NEW_AND_OLD_IMAGES"
tags = {
Plat11 = "legacy-pending-destroy"
}
lifecycle {
prevent_destroy = false
}
}
# PLAT-11: live WO tables are kebab-case (PascalCase destroyed).
resource "aws_dynamodb_table" "work_orders_kebab" {
name = "work-orders"