Remove orphan Litestream infrastructure from Terraform #31

Merged
forgejo_admin merged 1 commit from 30-remove-litestream-infra into main 2026-03-13 05:40:51 +00:00

Summary

Remove 4 orphan MinIO Litestream resources from terraform/main.tf. Litestream was replaced by CNPG for Postgres backups; these resources have been unused since the migration.

Changes

  • terraform/main.tf — Removed minio_s3_bucket.litestream_backups, minio_iam_user.litestream, minio_iam_policy.litestream_write, minio_iam_user_policy_attachment.litestream, and the # --- MinIO Litestream Service Account --- comment. The assets bucket and # --- MinIO Buckets --- comment are preserved.

Test Plan

  • tofu fmt -check passes (verified)
  • tofu validate requires provider init (not available in worktree) -- run manually
  • tofu plan should show exactly 4 destroys (the 4 removed resources) -- run manually before apply
  • No other references to "litestream" remain in main.tf

Review Checklist

  • tofu fmt -check passes
  • tofu validate passes (needs provider init)
  • tofu plan shows exactly 4 destroys (manual verification needed)
  • No remaining litestream references in codebase
  • README roadmap does not need updating
  • Plan: plan-2026-02-26-tf-modularize-postgres (Epilogue item 11)
  • Closes #30
## Summary Remove 4 orphan MinIO Litestream resources from `terraform/main.tf`. Litestream was replaced by CNPG for Postgres backups; these resources have been unused since the migration. ## Changes - `terraform/main.tf` — Removed `minio_s3_bucket.litestream_backups`, `minio_iam_user.litestream`, `minio_iam_policy.litestream_write`, `minio_iam_user_policy_attachment.litestream`, and the `# --- MinIO Litestream Service Account ---` comment. The `assets` bucket and `# --- MinIO Buckets ---` comment are preserved. ## Test Plan - `tofu fmt -check` passes (verified) - `tofu validate` requires provider init (not available in worktree) -- run manually - `tofu plan` should show exactly 4 destroys (the 4 removed resources) -- run manually before apply - No other references to "litestream" remain in main.tf ## Review Checklist - [x] `tofu fmt -check` passes - [ ] `tofu validate` passes (needs provider init) - [ ] `tofu plan` shows exactly 4 destroys (manual verification needed) - [x] No remaining litestream references in codebase - [ ] README roadmap does not need updating ## Related - Plan: `plan-2026-02-26-tf-modularize-postgres` (Epilogue item 11) - Closes #30
Litestream was replaced by CNPG for Postgres backups. Remove the 4
orphan MinIO resources: litestream_backups bucket, litestream IAM user,
litestream_write policy, and the user-policy attachment.

Closes #30

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Author
Owner

PR #31 Review

BLOCKERS

None.

NITS

None.

SOP COMPLIANCE

  • Branch named after issue (30-remove-litestream-infra references issue #30)
  • PR body follows template (Summary, Changes, Test Plan, Review Checklist, Related)
  • Related references plan slug (plan-2026-02-26-tf-modularize-postgres, Epilogue item 11)
  • Closes #30 present in PR body
  • No secrets committed
  • No scope creep (1 file, 38 deletions, 0 additions)

REVIEW NOTES

  • Exactly 4 resources removed: minio_s3_bucket.litestream_backups, minio_iam_user.litestream, minio_iam_policy.litestream_write, minio_iam_user_policy_attachment.litestream
  • # --- MinIO Litestream Service Account --- comment removed
  • # --- MinIO Buckets --- section header preserved (line 788)
  • minio_s3_bucket.assets resource preserved (line 790)
  • Repo-wide grep for "litestream" (case-insensitive) returns zero matches -- no dangling references
  • Diff is a pure deletion -- no additions, no refactoring, no unrelated changes

VERDICT: APPROVED

## PR #31 Review ### BLOCKERS None. ### NITS None. ### SOP COMPLIANCE - [x] Branch named after issue (`30-remove-litestream-infra` references issue #30) - [x] PR body follows template (Summary, Changes, Test Plan, Review Checklist, Related) - [x] Related references plan slug (`plan-2026-02-26-tf-modularize-postgres`, Epilogue item 11) - [x] `Closes #30` present in PR body - [x] No secrets committed - [x] No scope creep (1 file, 38 deletions, 0 additions) ### REVIEW NOTES - Exactly 4 resources removed: `minio_s3_bucket.litestream_backups`, `minio_iam_user.litestream`, `minio_iam_policy.litestream_write`, `minio_iam_user_policy_attachment.litestream` - `# --- MinIO Litestream Service Account ---` comment removed - `# --- MinIO Buckets ---` section header preserved (line 788) - `minio_s3_bucket.assets` resource preserved (line 790) - Repo-wide grep for "litestream" (case-insensitive) returns zero matches -- no dangling references - Diff is a pure deletion -- no additions, no refactoring, no unrelated changes ### VERDICT: APPROVED
forgejo_admin deleted branch 30-remove-litestream-infra 2026-03-13 05:40:51 +00:00
Sign in to join this conversation.
No description provided.