Skip to content

Commit c702d95

Browse files
authored
Initial commit
0 parents  commit c702d95

File tree

19 files changed

+591
-0
lines changed

19 files changed

+591
-0
lines changed

.editorconfig

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# EditorConfig is awesome: http://EditorConfig.org
2+
# Uses editorconfig to maintain consistent coding styles
3+
4+
# top-most EditorConfig file
5+
root = true
6+
7+
# Unix-style newlines with a newline ending every file
8+
[*]
9+
charset = utf-8
10+
end_of_line = lf
11+
indent_size = 2
12+
indent_style = space
13+
insert_final_newline = true
14+
max_line_length = 80
15+
trim_trailing_whitespace = true
16+
17+
[*.{yaml,yml}]
18+
max_line_length = 120
19+
20+
[*.{tf,tfvars}]
21+
indent_size = 2
22+
indent_style = space
23+
24+
[*.md]
25+
max_line_length = 0
26+
trim_trailing_whitespace = false
27+
28+
[Makefile]
29+
tab_width = 2
30+
indent_style = tab
31+
32+
[COMMIT_EDITMSG]
33+
max_line_length = 0

.gitattributes

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# terraform
2+
*.tf text=auto eol=lf
3+
4+
# dot files
5+
*.gitattributes text=auto eol=lf
6+
*.yaml text=auto eol=lf
7+
*.yml text=auto eol=lf
8+
*.md text=auto eol=lf
9+
.gitignore text=auto eol=lf
10+
.editorconfig text=auto eol=lf
11+
.terraform-version text=auto eol=lf
12+
13+
# golang
14+
*.go text=auto eol=lf

.github/workflows/snyk.yaml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
name: snyk
3+
4+
on: # yamllint disable-line rule:truthy
5+
push:
6+
branches:
7+
- '**' # matches every branch
8+
- '!main' # excludes main
9+
pull_request:
10+
branches:
11+
- main
12+
13+
jobs:
14+
security:
15+
runs-on:
16+
- arc
17+
name: snyk
18+
steps:
19+
- name: checkout
20+
uses: actions/checkout@v2
21+
- name: Vulnerability scan
22+
uses: snyk/actions/iac@master
23+
with:
24+
command: monitor
25+
args: --severity-threshold=low
26+
- name: Set up Node 16
27+
uses: actions/setup-node@v3
28+
with:
29+
node-version: 16
30+
- name: install Snyk CLI
31+
run: npm install -g snyk
32+
- name: snyk monitor
33+
run: snyk iac test --report
34+
env:
35+
SNYK_TOKEN: ${{ secrets.ARC_SNYK_TOKEN }}

.github/workflows/tag.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
name: Tag
3+
4+
on: # yamllint disable-line rule:truthy
5+
push:
6+
branches:
7+
- main
8+
9+
jobs:
10+
## tag
11+
tag:
12+
runs-on:
13+
- arc
14+
steps:
15+
- uses: actions/checkout@v2
16+
17+
- name: Set GIT_TAG
18+
run: |
19+
echo "VERSION=$(cat .version | tr -d " \t\n\r")" >> $GITHUB_ENV
20+
21+
- name: git-tag
22+
uses: pkgdeps/git-tag-action@v2.0.1
23+
with:
24+
version: ${{ env.VERSION }}
25+
github_token: ${{ secrets.GITHUB_TOKEN }}
26+
github_repo: ${{ github.repository }}
27+
git_commit_sha: ${{ github.sha }}
28+
git_tag_prefix: ""

.github/workflows/test.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
name: Test
3+
4+
on: # yamllint disable-line rule:truthy
5+
push:
6+
branches:
7+
- '**' # matches every branch
8+
- '!main' # excludes main
9+
pull_request:
10+
branches:
11+
- main
12+
13+
jobs:
14+
tflint:
15+
runs-on:
16+
- arc
17+
name: tflint
18+
steps:
19+
- uses: actions/checkout@master
20+
21+
- uses: terraform-linters/setup-tflint@v1
22+
with:
23+
tflint_version: latest
24+
25+
- name: Show version
26+
run: tflint --version
27+
28+
- name: Init tflint
29+
run: tflint --init
30+
31+
- name: Run tflint
32+
run: tflint -f compact
33+
34+
checkov:
35+
runs-on:
36+
- arc
37+
name: checkov
38+
steps:
39+
- uses: actions/checkout@master
40+
41+
- name: Run Checkov action
42+
id: checkov
43+
uses: bridgecrewio/checkov-action@master
44+
with:
45+
directory: .
46+
# yamllint disable-line rule:truthy # optional: display only failed checks
47+
quiet: true
48+
# optional: do not return an error code if there are failed checks.
49+
soft_fail: true
50+
# optional: run only on a specific infrastructure {cloudformation,terraform,kubernetes,all}
51+
framework: terraform
52+
# optional: the output format, one of: cli, json, junitxml, github_failed_only
53+
output_format: github_failed_only
54+
download_external_modules: false
55+
log_level: WARNING
56+
# optional: Define what UID and / or what GID to run the container under to prevent permission issues
57+
container_user: 1000

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.terraform
2+
terraform.tfstate
3+
*.tfstate*
4+
terraform.tfvars
5+
*.backup
6+
.idea
7+
.external_momdules

.pre-commit-config.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
repos:
3+
- repo: https://github.com/adrienverge/yamllint
4+
rev: v1.32.0
5+
hooks:
6+
- id: yamllint
7+
args:
8+
- '-d {extends: default, rules: {line-length: {max: 120}}}' # override to match .editorconfig
9+
- -s
10+
- repo: https://github.com/pre-commit/pre-commit-hooks
11+
rev: v4.5.0
12+
hooks:
13+
- id: check-yaml
14+
args:
15+
- --allow-multiple-documents
16+
- id: check-merge-conflict
17+
- id: trailing-whitespace
18+
args:
19+
- --markdown-linebreak-ext=md
20+
- id: end-of-file-fixer
21+
- repo: https://github.com/antonbabenko/pre-commit-terraform
22+
rev: v1.83.4
23+
hooks:
24+
- id: terraform_validate
25+
- id: terraform_tflint
26+
- id: terraform_fmt
27+
args:
28+
- --args=-recursive
29+
- id: terraform_docs
30+
- repo: https://github.com/dnephin/pre-commit-golang
31+
rev: v0.5.1
32+
hooks:
33+
- id: go-fmt

.terraform-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
latest:^1.5

.version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
0.0.1

0 commit comments

Comments
 (0)