chore: automate README docs generation and formatting

Manual `terraform-docs markdown .` was fragile — no injection markers,
no idempotency check, and no consistent formatting pipeline.

Add terraform-docs inject mode with BEGIN/END_TF_DOCS markers in the
README so `terraform-docs .` regenerates only the managed section.
Wrap the injected block with prettier-ignore directives to prevent
prettier from reformatting tables (which would break terraform-docs
--output-check).

Restructure Makefile with three targets:
- `docs`: regenerate terraform-docs + prettier format README
- `fmt`: docs + terraform fmt -recursive
- `check`: verify all docs/formatting are current (CI-friendly)

Add node (LTS) and prettier to .mise.toml for markdown formatting.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-02 14:32:57 +00:00
parent 1c2115b725
commit 8bdc77a2c9
4 changed files with 64 additions and 41 deletions

View File

@@ -1,4 +1,13 @@
.PHONY: docs
.SILENT: docs
.PHONY: docs fmt check
docs:
terraform-docs markdown .
terraform-docs .
prettier --write README.md
fmt: docs
terraform fmt -recursive
check:
terraform-docs --output-check .
prettier --check README.md
terraform fmt -check -recursive