Skip to content

Commit 0c733cb

Browse files
draft
0 parents  commit 0c733cb

25 files changed

+582
-0
lines changed

.gitattributes

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
###############################################################################
2+
# Set default behavior to automatically normalize line endings.
3+
###############################################################################
4+
* text=auto
5+
6+
###############################################################################
7+
# Set default behavior for command prompt diff.
8+
#
9+
# This is need for earlier builds of msysgit that does not have it on by
10+
# default for csharp files.
11+
# Note: This is only used by command line
12+
###############################################################################
13+
#*.cs diff=csharp
14+
15+
###############################################################################
16+
# Set the merge driver for project and solution files
17+
#
18+
# Merging from the command prompt will add diff markers to the files if there
19+
# are conflicts (Merging from VS is not affected by the settings below, in VS
20+
# the diff markers are never inserted). Diff markers may cause the following
21+
# file extensions to fail to load in VS. An alternative would be to treat
22+
# these files as binary and thus will always conflict and require user
23+
# intervention with every merge. To do so, just uncomment the entries below
24+
###############################################################################
25+
#*.sln merge=binary
26+
#*.csproj merge=binary
27+
#*.vbproj merge=binary
28+
#*.vcxproj merge=binary
29+
#*.vcproj merge=binary
30+
#*.dbproj merge=binary
31+
#*.fsproj merge=binary
32+
#*.lsproj merge=binary
33+
#*.wixproj merge=binary
34+
#*.modelproj merge=binary
35+
#*.sqlproj merge=binary
36+
#*.wwaproj merge=binary
37+
38+
###############################################################################
39+
# behavior for image files
40+
#
41+
# image files are treated as binary by default.
42+
###############################################################################
43+
#*.jpg binary
44+
#*.png binary
45+
#*.gif binary
46+
47+
###############################################################################
48+
# diff behavior for common document formats
49+
#
50+
# Convert binary document formats to text before diffing them. This feature
51+
# is only available from the command line. Turn it on by uncommenting the
52+
# entries below.
53+
###############################################################################
54+
#*.doc diff=astextplain
55+
#*.DOC diff=astextplain
56+
#*.docx diff=astextplain
57+
#*.DOCX diff=astextplain
58+
#*.dot diff=astextplain
59+
#*.DOT diff=astextplain
60+
#*.pdf diff=astextplain
61+
#*.PDF diff=astextplain
62+
#*.rtf diff=astextplain
63+
#*.RTF diff=astextplain

.github/workflows/main.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
---
2+
# yamllint disable rule:line-length
3+
name: Verify and Bump
4+
on:
5+
schedule:
6+
- cron: '00 7 * * SUN'
7+
push:
8+
branches:
9+
- main
10+
env:
11+
terraform: 0.14.5
12+
tf_target_dir: example/examplea
13+
branch: main
14+
jobs:
15+
terraform:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v2
20+
with:
21+
ref: ${{ env.branch }}
22+
token: ${{ github.token }}
23+
- name: Terraform Init
24+
uses: hashicorp/terraform-github-actions@master
25+
with:
26+
tf_actions_version: ${{ env.terraform }}
27+
tf_actions_subcommand: init
28+
tf_actions_working_dir: ${{ env.tf_target_dir }}
29+
- name: Terraform Validate
30+
uses: hashicorp/terraform-github-actions@master
31+
with:
32+
tf_actions_version: ${{ env.terraform }}
33+
tf_actions_subcommand: validate
34+
tf_actions_working_dir: ${{ env.tf_target_dir }}
35+
security:
36+
runs-on: ubuntu-latest
37+
steps:
38+
- name: Checkout
39+
uses: actions/checkout@v2
40+
with:
41+
ref: ${{ env.branch }}
42+
token: ${{ github.token }}
43+
44+
- name: Checkov action
45+
uses: bridgecrewio/checkov-action@master
46+
with:
47+
directory: ${{ env.tf_target_dir }}
48+
framework: terraform
49+
args: "--output cli --bc-api-key ${{ secrets.BC_API_KEY }}"
50+
version:
51+
name: versioning
52+
runs-on: ubuntu-latest
53+
steps:
54+
- uses: actions/checkout@master
55+
- name: Bump version and push tag
56+
if: ${{ !env.ACT }}
57+
uses: anothrNick/github-tag-action@master
58+
env:
59+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60+
DEFAULT_BUMP: patch
61+
WITH_V: "true"
62+
needs: [terraform, security]

.github/workflows/pull_request.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
# yamllint disable rule:line-length
3+
name: pull_request
4+
on: pull_request
5+
env:
6+
terraform: 0.14.5
7+
tf_target_dir: example/examplea
8+
9+
jobs:
10+
terraform:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v2
15+
with:
16+
token: ${{ github.token }}
17+
- name: Terraform Init
18+
uses: hashicorp/terraform-github-actions@master
19+
with:
20+
tf_actions_version: ${{ env.terraform }}
21+
tf_actions_subcommand: init
22+
tf_actions_working_dir: ${{ env.tf_target_dir }}
23+
- name: Terraform Validate
24+
uses: hashicorp/terraform-github-actions@master
25+
with:
26+
tf_actions_version: ${{ env.terraform }}
27+
tf_actions_subcommand: validate
28+
tf_actions_working_dir: ${{ env.tf_target_dir }}
29+
security:
30+
runs-on: ubuntu-latest
31+
steps:
32+
- name: Checkout
33+
uses: actions/checkout@v2
34+
with:
35+
token: ${{ github.token }}
36+
37+
- name: Checkov action
38+
uses: bridgecrewio/checkov-action@master
39+
with:
40+
directory: "example/examplea"
41+
framework: terraform
42+
args: "--output cli --bc-api-key ${{ secrets.BC_API_KEY }}"

.gitignore

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Compiled files
2+
*.tfstate
3+
*.tfstate.backup
4+
*.zip
5+
.DS_Store
6+
# Module directory
7+
.terraform/
8+
.terraform
9+
__pycache__/
10+
.idea
11+
*.iml
12+
*.orig
13+
*.ini
14+
*~HEAD
15+
*backup
16+
*.ini
17+
tmp
18+
lambda
19+
*~HEAD
20+
*backup
21+
*.bak
22+
.terraform.tfstate.lock.info
23+
.terraform.lock.hcl
24+
*.log

.markdownlint.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"MD002": false,
3+
"MD013": false,
4+
"MD033": {
5+
"allowed_elements": [
6+
"br",
7+
"pre"
8+
]
9+
},
10+
"MD034": false,
11+
"MD041": false
12+
}

.markdownlintrc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"default": true,
3+
"first-header-h1": false,
4+
"first-line-h1": false,
5+
"line_length": false,
6+
"no-multiple-blanks": false
7+
}

.pre-commit-config.yaml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
# yamllint disable rule:line-length
3+
default_language_version:
4+
python: python3.8
5+
repos:
6+
- repo: git://github.com/pre-commit/pre-commit-hooks
7+
rev: v3.4.0
8+
hooks:
9+
- id: check-json
10+
- id: check-merge-conflict
11+
- id: trailing-whitespace
12+
- id: end-of-file-fixer
13+
- id: check-yaml
14+
- id: check-added-large-files
15+
- id: pretty-format-json
16+
args:
17+
- --autofix
18+
- id: detect-aws-credentials
19+
args:
20+
- --allow-missing-credentials
21+
- id: detect-private-key
22+
- repo: git://github.com/Lucas-C/pre-commit-hooks
23+
rev: v1.1.9
24+
hooks:
25+
- id: forbid-tabs
26+
exclude_types: [python, javascript, dtd, markdown, makefile, xml]
27+
exclude: binary|\.bin$
28+
- repo: git://github.com/jameswoolfenden/pre-commit-shell
29+
rev: 0.0.2
30+
hooks:
31+
- id: shell-lint
32+
- repo: git://github.com/igorshubovych/markdownlint-cli
33+
rev: v0.26.0
34+
hooks:
35+
- id: markdownlint
36+
- repo: git://github.com/adrienverge/yamllint
37+
rev: v1.26.0
38+
hooks:
39+
- id: yamllint
40+
name: yamllint
41+
description: This hook runs yamllint.
42+
entry: yamllint
43+
language: python
44+
types: [file, yaml]
45+
- repo: git://github.com/jameswoolfenden/pre-commit
46+
rev: v0.1.35
47+
hooks:
48+
- id: terraform-fmt
49+
language_version: python3.8
50+
- id: tf2docs
51+
language_version: python3.8
52+
- repo: git://github.com/bridgecrewio/checkov
53+
rev: 1.0.817
54+
hooks:
55+
- id: checkov
56+
verbose: true
57+
entry: checkov -d example/examplea --external-checks-dir checkov

.prettierignore

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

.terraformignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.terraform/
2+
*.exe
3+
*.tfstate
4+
*.backup
5+
*.bak
6+
*.info

0 commit comments

Comments
 (0)