Skip to content

Commit

Permalink
Merge pull request #1 from lablabs/init
Browse files Browse the repository at this point in the history
Create the first cluster-autoscaler module version
  • Loading branch information
adys authored Jul 16, 2020
2 parents 0885b7c + 893ecdb commit 92075bc
Show file tree
Hide file tree
Showing 14 changed files with 800 additions and 1 deletion.
93 changes: 93 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Terraform validation

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

env:
TERRAFORM_DOCS_VERSION: "v0.9.1"
TFLINT_VERSION: "v0.16.2"

jobs:
terraform-validation:
runs-on: ubuntu-latest

steps:
- uses: actions/setup-python@v1
name: "SETUP: Python"

- uses: actions/setup-go@v2
name: "SETUP: Go"

- uses: pat-s/[email protected]
id: cache-terraform-docs
name: "CACHE: terraform-docs Go module"
with:
path: |
~/go/pkg/mod
~/go/bin/terraform-docs
key: ${{ runner.os }}-terraform_docs-${{ env.TERRAFORM_DOCS_VERSION }}
restore-keys: |
${{ runner.os}}-terraform_docs-
- shell: bash
name: "INSTALL: terraform-docs"
if: steps.cache-terraform-docs.output.cache-hit != 'true'
env:
GO111MODULE: "on"
run: |
go get github.com/segmentio/terraform-docs@${{ env.TERRAFORM_DOCS_VERSION }}
- shell: bash
name: "SETUP: Go path"
run: echo '::add-path::~/go/bin/'

- uses: actions/checkout@v1
name: Checkout source code

- uses: pat-s/[email protected]
id: cache-pre-commit-dependencies
name: "CACHE: pip and pre-commit dependencies"
with:
path: |
~/.cache/pre-commit
~/.cache/pip
key: ${{ runner.os }}-pip-pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
restore-keys: |
${{ runner.os }}-pip-pre-commit-
- uses: pat-s/[email protected]
id: cache-tflint
name: "CACHE: TFLint"
with:
path: |
~/tflint/bin/
key: ${{ runner.os }}-tflint-${{ env.TFLINT_VERSION }}
restore-keys: |
${{ runner.os }}-tflint-
- shell: bash
name: "INSTALL: detect-secrets"
run: |
pip install detect-secrets
- shell: bash
name: "INSTALL: TFLint"
if: steps.cache-tflint.outputs.cache-hit != 'true'
run: |
wget https://github.com/terraform-linters/tflint/releases/download/${{ env.TFLINT_VERSION }}/tflint_linux_amd64.zip
unzip tflint_linux_amd64.zip
mkdir -p ~/tflint/bin/
install tflint ~/tflint/bin/
- shell: bash
name: "SETUP: TFLint path"
run: |
echo '::add-path::~/tflint/bin/'
- uses: pre-commit/[email protected]
name: "RUN: pre-commit"
env:
AWS_DEFAULT_REGION: "eu-central-1"
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.terraform
40 changes: 40 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
repos:
- repo: git://github.com/antonbabenko/pre-commit-terraform
rev: v1.31.0
hooks:
- id: terraform_fmt
- id: terraform_docs
args:
- '--args=--no-providers --sort-by-required'

- repo: git://github.com/pecigonzalo/pre-commit-terraform-vars
rev: 8e947e99c45314397a8caacebefab44d74227b6b
hooks:
- id: terraform-vars

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.1.0
hooks:
- id: check-merge-conflict
- id: trailing-whitespace
- id: check-yaml
- id: check-added-large-files
- id: detect-aws-credentials
args:
- '--allow-missing-credentials'
- id: detect-private-key
- id: end-of-file-fixer

- repo: https://github.com/gruntwork-io/pre-commit
rev: v0.1.9
hooks:
- id: tflint
- id: terraform-validate

- repo: https://github.com/Yelp/detect-secrets
rev: v0.13.1
hooks:
- id: detect-secrets
args:
- '--baseline'
- '.secrets.baseline'
66 changes: 66 additions & 0 deletions .secrets.baseline
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"exclude": {
"files": null,
"lines": null
},
"generated_at": "2020-07-07T15:04:21Z",
"plugins_used": [
{
"name": "AWSKeyDetector"
},
{
"name": "ArtifactoryDetector"
},
{
"base64_limit": 4.5,
"name": "Base64HighEntropyString"
},
{
"name": "BasicAuthDetector"
},
{
"name": "CloudantDetector"
},
{
"hex_limit": 3,
"name": "HexHighEntropyString"
},
{
"name": "IbmCloudIamDetector"
},
{
"name": "IbmCosHmacDetector"
},
{
"name": "JwtTokenDetector"
},
{
"keyword_exclude": null,
"name": "KeywordDetector"
},
{
"name": "MailchimpDetector"
},
{
"name": "PrivateKeyDetector"
},
{
"name": "SlackDetector"
},
{
"name": "SoftlayerDetector"
},
{
"name": "StripeDetector"
},
{
"name": "TwilioKeyDetector"
}
],
"results": {},
"version": "0.13.1",
"word_list": {
"file": null,
"hash": null
}
}
Loading

0 comments on commit 92075bc

Please sign in to comment.