Skip to content

Commit 59fd938

Browse files
author
Kilian
committed
Initial commit
0 parents  commit 59fd938

18 files changed

+845
-0
lines changed

.github/.secrets.baseline

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
{
2+
"version": "1.2.0",
3+
"plugins_used": [
4+
{
5+
"name": "ArtifactoryDetector"
6+
},
7+
{
8+
"name": "AWSKeyDetector"
9+
},
10+
{
11+
"name": "AzureStorageKeyDetector"
12+
},
13+
{
14+
"name": "Base64HighEntropyString",
15+
"limit": 4.5
16+
},
17+
{
18+
"name": "BasicAuthDetector"
19+
},
20+
{
21+
"name": "CloudantDetector"
22+
},
23+
{
24+
"name": "GitHubTokenDetector"
25+
},
26+
{
27+
"name": "HexHighEntropyString",
28+
"limit": 3.0
29+
},
30+
{
31+
"name": "IbmCloudIamDetector"
32+
},
33+
{
34+
"name": "IbmCosHmacDetector"
35+
},
36+
{
37+
"name": "JwtTokenDetector"
38+
},
39+
{
40+
"name": "KeywordDetector",
41+
"keyword_exclude": ""
42+
},
43+
{
44+
"name": "MailchimpDetector"
45+
},
46+
{
47+
"name": "NpmDetector"
48+
},
49+
{
50+
"name": "PrivateKeyDetector"
51+
},
52+
{
53+
"name": "SendGridDetector"
54+
},
55+
{
56+
"name": "SlackDetector"
57+
},
58+
{
59+
"name": "SoftlayerDetector"
60+
},
61+
{
62+
"name": "SquareOAuthDetector"
63+
},
64+
{
65+
"name": "StripeDetector"
66+
},
67+
{
68+
"name": "TwilioKeyDetector"
69+
}
70+
],
71+
"filters_used": [
72+
{
73+
"path": "detect_secrets.filters.allowlist.is_line_allowlisted"
74+
},
75+
{
76+
"path": "detect_secrets.filters.common.is_ignored_due_to_verification_policies",
77+
"min_level": 2
78+
},
79+
{
80+
"path": "detect_secrets.filters.gibberish.should_exclude_secret",
81+
"limit": 3.7
82+
},
83+
{
84+
"path": "detect_secrets.filters.heuristic.is_indirect_reference"
85+
},
86+
{
87+
"path": "detect_secrets.filters.heuristic.is_likely_id_string"
88+
},
89+
{
90+
"path": "detect_secrets.filters.heuristic.is_lock_file"
91+
},
92+
{
93+
"path": "detect_secrets.filters.heuristic.is_not_alphanumeric_string"
94+
},
95+
{
96+
"path": "detect_secrets.filters.heuristic.is_potential_uuid"
97+
},
98+
{
99+
"path": "detect_secrets.filters.heuristic.is_prefixed_with_dollar_sign"
100+
},
101+
{
102+
"path": "detect_secrets.filters.heuristic.is_sequential_string"
103+
},
104+
{
105+
"path": "detect_secrets.filters.heuristic.is_swagger_file"
106+
},
107+
{
108+
"path": "detect_secrets.filters.heuristic.is_templated_secret"
109+
}
110+
],
111+
"results": {},
112+
"generated_at": "2024-02-17T17:33:52Z"
113+
}

.github/diagrams/function-dark.png

257 KB
Loading
259 KB
Loading
253 KB
Loading

.github/diagrams/function.drawio

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
<mxfile host="app.diagrams.net" modified="2024-02-24T23:45:09.554Z" agent="Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:123.0) Gecko/20100101 Firefox/123.0" etag="RvXtkD-DZk5Ur88Rm3Lm" version="23.1.6" type="device">
2+
<diagram name="Page-1" id="z6MlrTnO1uHHdYoNLohP">
3+
<mxGraphModel dx="819" dy="453" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="850" pageHeight="1100" math="0" shadow="0">
4+
<root>
5+
<mxCell id="0" />
6+
<mxCell id="1" parent="0" />
7+
<mxCell id="5XbrsSFNruDuMF39BsKj-1" value="AWS Cloud" style="points=[[0,0],[0.25,0],[0.5,0],[0.75,0],[1,0],[1,0.25],[1,0.5],[1,0.75],[1,1],[0.75,1],[0.5,1],[0.25,1],[0,1],[0,0.75],[0,0.5],[0,0.25]];outlineConnect=0;gradientColor=none;html=1;whiteSpace=wrap;fontSize=12;fontStyle=0;container=0;pointerEvents=0;collapsible=0;recursiveResize=0;shape=mxgraph.aws4.group;grIcon=mxgraph.aws4.group_aws_cloud_alt;strokeColor=#232F3E;fillColor=none;verticalAlign=top;align=left;spacingLeft=30;fontColor=#232F3E;dashed=0;" parent="1" vertex="1">
8+
<mxGeometry x="44" y="184" width="610" height="350" as="geometry" />
9+
</mxCell>
10+
<mxCell id="7VSfqjxM2VctQeidwvQ3-4" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;" parent="1" edge="1">
11+
<mxGeometry relative="1" as="geometry">
12+
<mxPoint x="180" y="359" as="sourcePoint" />
13+
<mxPoint x="300" y="359.48" as="targetPoint" />
14+
<Array as="points">
15+
<mxPoint x="180" y="360" />
16+
</Array>
17+
</mxGeometry>
18+
</mxCell>
19+
<mxCell id="7VSfqjxM2VctQeidwvQ3-5" value="Pulls latest image" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;container=0;" parent="1" vertex="1">
20+
<mxGeometry x="190" y="324" width="90" height="30" as="geometry" />
21+
</mxCell>
22+
<mxCell id="7VSfqjxM2VctQeidwvQ3-7" value="Puts log events" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;container=0;" parent="1" vertex="1">
23+
<mxGeometry x="430" y="324" width="60" height="30" as="geometry" />
24+
</mxCell>
25+
<mxCell id="7VSfqjxM2VctQeidwvQ3-9" value="Lambda" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=20;container=0;" parent="1" vertex="1">
26+
<mxGeometry x="294" y="410" width="110" height="30" as="geometry" />
27+
</mxCell>
28+
<mxCell id="7VSfqjxM2VctQeidwvQ3-10" value="Cloudwatch" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=20;container=0;" parent="1" vertex="1">
29+
<mxGeometry x="514" y="410" width="110" height="30" as="geometry" />
30+
</mxCell>
31+
<mxCell id="7VSfqjxM2VctQeidwvQ3-11" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;startArrow=none;startFill=0;endArrow=classic;endFill=1;" parent="1" edge="1">
32+
<mxGeometry relative="1" as="geometry">
33+
<mxPoint x="400" y="358.76" as="sourcePoint" />
34+
<mxPoint x="520" y="359.24" as="targetPoint" />
35+
<Array as="points">
36+
<mxPoint x="400" y="359.76" />
37+
</Array>
38+
</mxGeometry>
39+
</mxCell>
40+
<mxCell id="waU-er1XK3HUR5QqYbRZ-1" value="" style="sketch=0;points=[[0,0,0],[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0,0],[0,1,0],[0.25,1,0],[0.5,1,0],[0.75,1,0],[1,1,0],[0,0.25,0],[0,0.5,0],[0,0.75,0],[1,0.25,0],[1,0.5,0],[1,0.75,0]];outlineConnect=0;fontColor=#232F3E;fillColor=#ED7100;strokeColor=#ffffff;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=center;html=1;fontSize=12;fontStyle=0;aspect=fixed;shape=mxgraph.aws4.resourceIcon;resIcon=mxgraph.aws4.ecr;container=0;" vertex="1" parent="1">
41+
<mxGeometry x="90" y="320" width="78" height="78" as="geometry" />
42+
</mxCell>
43+
<mxCell id="waU-er1XK3HUR5QqYbRZ-2" value="" style="sketch=0;points=[[0,0,0],[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0,0],[0,1,0],[0.25,1,0],[0.5,1,0],[0.75,1,0],[1,1,0],[0,0.25,0],[0,0.5,0],[0,0.75,0],[1,0.25,0],[1,0.5,0],[1,0.75,0]];outlineConnect=0;fontColor=#232F3E;fillColor=#ED7100;strokeColor=#ffffff;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=center;html=1;fontSize=12;fontStyle=0;aspect=fixed;shape=mxgraph.aws4.resourceIcon;resIcon=mxgraph.aws4.lambda;container=0;" vertex="1" parent="1">
44+
<mxGeometry x="310" y="320" width="78" height="78" as="geometry" />
45+
</mxCell>
46+
<mxCell id="waU-er1XK3HUR5QqYbRZ-3" value="" style="sketch=0;points=[[0,0,0],[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0,0],[0,1,0],[0.25,1,0],[0.5,1,0],[0.75,1,0],[1,1,0],[0,0.25,0],[0,0.5,0],[0,0.75,0],[1,0.25,0],[1,0.5,0],[1,0.75,0]];points=[[0,0,0],[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0,0],[0,1,0],[0.25,1,0],[0.5,1,0],[0.75,1,0],[1,1,0],[0,0.25,0],[0,0.5,0],[0,0.75,0],[1,0.25,0],[1,0.5,0],[1,0.75,0]];outlineConnect=0;fontColor=#232F3E;fillColor=#E7157B;strokeColor=#ffffff;dashed=0;verticalLabelPosition=bottom;verticalAlign=top;align=center;html=1;fontSize=12;fontStyle=0;aspect=fixed;shape=mxgraph.aws4.resourceIcon;resIcon=mxgraph.aws4.cloudwatch_2;container=0;" vertex="1" parent="1">
47+
<mxGeometry x="530" y="320" width="78" height="78" as="geometry" />
48+
</mxCell>
49+
<mxCell id="7VSfqjxM2VctQeidwvQ3-8" value="ECR Repository" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;fontSize=20;container=0;" parent="1" vertex="1">
50+
<mxGeometry x="54" y="410" width="150" height="30" as="geometry" />
51+
</mxCell>
52+
<mxCell id="waU-er1XK3HUR5QqYbRZ-5" value="" style="endArrow=classic;html=1;rounded=0;" edge="1" parent="1">
53+
<mxGeometry width="50" height="50" relative="1" as="geometry">
54+
<mxPoint x="348.71" y="230" as="sourcePoint" />
55+
<mxPoint x="348.71" y="310" as="targetPoint" />
56+
</mxGeometry>
57+
</mxCell>
58+
<mxCell id="waU-er1XK3HUR5QqYbRZ-6" value="invocation" style="text;html=1;align=center;verticalAlign=middle;whiteSpace=wrap;rounded=0;" vertex="1" parent="1">
59+
<mxGeometry x="360" y="250" width="60" height="30" as="geometry" />
60+
</mxCell>
61+
</root>
62+
</mxGraphModel>
63+
</diagram>
64+
</mxfile>

.github/hooks/pre-commit

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/sh
2+
3+
# Run terraform fmt on all .tf files in the repository
4+
terraform_files=$(git diff --cached --name-only --diff-filter=ACMRTUXB | grep -E '\.tf$|\.tftest.hcl$')
5+
if [ -n "$terraform_files" ]; then
6+
echo "Formatting Terraform files..."
7+
terraform fmt -write=true $terraform_files
8+
git add $terraform_files
9+
fi
10+
11+
exit 0

.github/workflows/lint.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Lint
2+
3+
on:
4+
push:
5+
branches: ["**"]
6+
7+
jobs:
8+
lint:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout source code
13+
uses: actions/checkout@v4
14+
15+
- name: Setup TFLint
16+
uses: terraform-linters/setup-tflint@v3
17+
with:
18+
tflint_version: v0.44.1
19+
20+
- name: Show TFLint version
21+
run: tflint --version
22+
23+
- name: Init TFLint
24+
run: tflint --init
25+
env:
26+
GITHUB_TOKEN: ${{ github.token }}
27+
28+
- name: Run TFLint
29+
run: tflint -f compact

.github/workflows/secrets-scan.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Secrets Scan
2+
3+
on:
4+
push:
5+
branches: ["**"]
6+
7+
jobs:
8+
scan:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout source code
13+
uses: actions/checkout@v4
14+
15+
- name: Move .secrets.baseline file
16+
run: mv .github/.secrets.baseline .
17+
18+
- name: Scan for secrets
19+
uses: secret-scanner/action@0.0.2

.github/workflows/test.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches: ["**"]
6+
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout source code
13+
uses: actions/checkout@v4
14+
15+
- name: Setup Terraform
16+
uses: hashicorp/setup-terraform@v3
17+
with:
18+
terraform_version: latest
19+
20+
- name: Init Terraform
21+
run: terraform init
22+
23+
- name: Run Terraform Test
24+
run: terraform test
25+
env:
26+
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
27+
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}

.gitignore

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Editor directories and files
2+
.vscode/*
3+
!.vscode/extensions.json
4+
.idea
5+
.DS_Store
6+
*.suo
7+
*.ntvs*
8+
*.njsproj
9+
*.sln
10+
*.sw?
11+
12+
# Terraform files
13+
**/.terraform/*
14+
*.tfstate
15+
*.tfstate.*
16+
crash.log
17+
crash.*.log
18+
.terraform.lock.hcl
19+
*.tfvars
20+
*.tfvars.json
21+
override.tf
22+
override.tf.json
23+
*_override.tf
24+
*_override.tf.json
25+
*tfplan*
26+
.terraformrc
27+
terraform.rc

0 commit comments

Comments
 (0)