Remove orphan Litestream infrastructure from Terraform #30

Closed
opened 2026-03-13 05:16:20 +00:00 by forgejo_admin · 0 comments

Lineage

plan-2026-02-26-tf-modularize-postgres → Epilogue → Item 11

Repo

forgejo_admin/pal-e-platform

User Story

As a platform operator
I want to remove the orphan Litestream MinIO resources from Terraform
So that the infrastructure matches reality (CNPG replaced Litestream in Phase 3)

Context

Litestream was the SQLite backup solution — WAL replication to MinIO. It was replaced entirely by CNPG's native PostgreSQL WAL archiving in Phase 3. Four orphan Terraform resources remain in terraform/main.tf that manage a MinIO bucket and IAM user that are no longer used by anything.

Additionally, sop-litestream-restore in pal-e-docs documents restoring from Litestream backups that no longer exist. That SOP needs to be archived (tag update, not deletion) — but that's a pal-e-docs concern, not this repo. This issue covers only the Terraform side.

File Targets

Files the agent should modify:

  • terraform/main.tf — remove 4 Litestream resources (lines ~790-832)

Files the agent should NOT touch:

  • Everything else — this is a pure removal

Acceptance Criteria

  • minio_s3_bucket.litestream_backups removed
  • minio_iam_user.litestream removed
  • minio_iam_policy.litestream_write removed
  • minio_iam_user_policy_attachment.litestream removed
  • tofu validate passes
  • tofu plan shows exactly 4 destroys, 0 additions/changes
  • No other resources reference litestream in any Terraform file

Test Expectations

  • tofu fmt -check passes
  • tofu validate passes
  • tofu plan output included in PR showing 4 destroy operations

Constraints

  • Do NOT run tofu apply — Lucas will apply manually after review
  • Run tofu plan and include output in PR description
  • Follow existing code style (the surrounding # --- MinIO Buckets --- comment block stays, assets bucket stays)

Checklist

  • PR opened
  • tofu plan output in PR
  • No unrelated changes
  • plan-2026-02-26-tf-modularize-postgres — parent plan, Epilogue item 11
  • sop-litestream-restore — stale SOP to archive separately
  • phase-postgres-3-migrate-pal-e-docs — the phase that made Litestream obsolete
### Lineage `plan-2026-02-26-tf-modularize-postgres` → Epilogue → Item 11 ### Repo `forgejo_admin/pal-e-platform` ### User Story As a platform operator I want to remove the orphan Litestream MinIO resources from Terraform So that the infrastructure matches reality (CNPG replaced Litestream in Phase 3) ### Context Litestream was the SQLite backup solution — WAL replication to MinIO. It was replaced entirely by CNPG's native PostgreSQL WAL archiving in Phase 3. Four orphan Terraform resources remain in `terraform/main.tf` that manage a MinIO bucket and IAM user that are no longer used by anything. Additionally, `sop-litestream-restore` in pal-e-docs documents restoring from Litestream backups that no longer exist. That SOP needs to be archived (tag update, not deletion) — but that's a pal-e-docs concern, not this repo. This issue covers only the Terraform side. ### File Targets Files the agent should modify: - `terraform/main.tf` — remove 4 Litestream resources (lines ~790-832) Files the agent should NOT touch: - Everything else — this is a pure removal ### Acceptance Criteria - [ ] `minio_s3_bucket.litestream_backups` removed - [ ] `minio_iam_user.litestream` removed - [ ] `minio_iam_policy.litestream_write` removed - [ ] `minio_iam_user_policy_attachment.litestream` removed - [ ] `tofu validate` passes - [ ] `tofu plan` shows exactly 4 destroys, 0 additions/changes - [ ] No other resources reference `litestream` in any Terraform file ### Test Expectations - [ ] `tofu fmt -check` passes - [ ] `tofu validate` passes - [ ] `tofu plan` output included in PR showing 4 destroy operations ### Constraints - Do NOT run `tofu apply` — Lucas will apply manually after review - Run `tofu plan` and include output in PR description - Follow existing code style (the surrounding `# --- MinIO Buckets ---` comment block stays, `assets` bucket stays) ### Checklist - [ ] PR opened - [ ] `tofu plan` output in PR - [ ] No unrelated changes ### Related - `plan-2026-02-26-tf-modularize-postgres` — parent plan, Epilogue item 11 - `sop-litestream-restore` — stale SOP to archive separately - `phase-postgres-3-migrate-pal-e-docs` — the phase that made Litestream obsolete
forgejo_admin 2026-03-13 05:19:31 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
forgejo_admin/pal-e-platform#30
No description provided.