feat: adding terraform readme generator

This commit is contained in:
allanice001
2025-11-05 23:00:45 +00:00
parent b09c3179c7
commit ea26b8526c
7 changed files with 483 additions and 3 deletions

View File

@@ -0,0 +1,30 @@
# Makefile
# Usage:
# make # generate Markdown from schema
# make schema # just (re)generate schema.json
# make clean # remove generated files
#
# Notes:
# - CLI defaults to 'tofu' but can be switched to 'terraform' by doing: make CLI=terraform
# - Your cwd must contain a minimal config that requires the provider so the schema includes it.
CLI ?= tofu
SCHEMA ?= schema.json
OUT ?= autoglue_provider_reference.md
GEN ?= scripts/gen_md.py
PROVIDER ?= glueops/autoglue/autoglue
.PHONY: all schema clean
all: $(OUT)
schema: $(SCHEMA)
$(SCHEMA):
$(CLI) providers schema -json > $(SCHEMA)
$(OUT): $(SCHEMA) $(GEN)
python3 $(GEN) --provider "$(PROVIDER)" --schema "$(SCHEMA)" --out "$(OUT)"
clean:
rm -f $(SCHEMA) $(OUT)