-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathMakefile
More file actions
30 lines (25 loc) · 1.04 KB
/
Makefile
File metadata and controls
30 lines (25 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
.PHONY: help docs install-terraform-docs fmt
help: ## Show this help message
@echo 'Usage: make [target]'
@echo ''
@echo 'Available targets:'
@awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z_-]+:.*?## / {printf " %-20s %s\n", $$1, $$2}' $(MAKEFILE_LIST)
install-terraform-docs: ## Install terraform-docs tool
@if which terraform-docs >/dev/null 2>&1; then \
echo "terraform-docs is already installed"; \
elif which go >/dev/null 2>&1; then \
echo "Installing terraform-docs..."; \
go install github.com/terraform-docs/terraform-docs@v0.20.0; \
echo "terraform-docs installed successfully!"; \
else \
echo "Please install terraform-docs manually: https://terraform-docs.io/user-guide/installation/"; \
exit 1; \
fi
docs: ## Generate documentation for all modules
@echo "Generating documentation for all modules..."
@terraform-docs --config .terraform-docs.yml .
@echo "Documentation generated successfully!"
fmt: ## Format all Terraform files
@echo "Formatting Terraform files..."
@terraform fmt -recursive .
@echo "All Terraform files formatted!"