feat: fmt and docs
This commit is contained in:
1 parent
60f8bd350a
commit
8946fc508b
3 files changed
+36
No files matched your search
@@ -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
|
||||
@@ -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
|
||||
@@ -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"]
|
||||
Reference in new issue
Block a user