feat: fmt and docs

This commit is contained in:
David FILLON committed 2023-12-15 17:50:40 +01:00
1 parent 60f8bd350a
commit 8946fc508b
4 files changed
+37 -1

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
minimum_pre_commit_version: "3.6.0"
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
+19
View File
@@ -0,0 +1,19 @@
- id: terraform-fmt
name: Format Terraform files
entry: /usr/local/bin/terraform
language: docker
args:
- "fmt"
pass_filenames: false
- id: terraform-docs
name: Genration of Terraform module documentation
entry: /usr/local/bin/terraform-docs
language: docker
args:
- "markdown"
- "table"
- "."
- "--output-file"
- "README.md"
pass_filenames: false
+9
View File
@@ -0,0 +1,9 @@
FROM alpine:latest as build
WORKDIR /src
RUN wget -q https://releases.hashicorp.com/terraform/1.6.6/terraform_1.6.6_linux_amd64.zip && unzip *.zip
RUN wget -q https://terraform-docs.io/dl/v0.16.0/terraform-docs-v0.16.0-$(uname)-amd64.tar.gz && tar xzf *.tar.gz
FROM scratch
COPY --from=build /src/terraform /usr/local/bin/
COPY --from=build /src/terraform-docs /usr/local/bin/
ENTRYPOINT ["/usr/local/bin/terraform"]
+1 -1
View File
@@ -1,3 +1,3 @@
# pre-commit-terraform
pre-commit git hooks about Terraform stacks or modules.
pre-commit git hooks about Terraform stacks or modules.