Skip to content

Commit 3e35b0d

Browse files
committed
feat: create inital module implementation
1 parent 1c7d54a commit 3e35b0d

File tree

18 files changed

+1501
-0
lines changed

18 files changed

+1501
-0
lines changed

.github/.dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"

.github/workflows/release.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: release
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout Code
16+
# v6.0.0
17+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
18+
19+
- name: Bump Version
20+
id: tag_version
21+
# v6.2
22+
uses: mathieudutour/github-tag-action@d28fa2ccfbd16e871a4bdf35e11b3ad1bd56c0c1
23+
with:
24+
github_token: ${{ secrets.GITHUB_TOKEN }}
25+
default_bump: minor
26+
custom_release_rules: bug:patch:Fixes,chore:patch:Chores,docs:patch:Documentation,feat:minor:Features,refactor:minor:Refactors,test:patch:Tests,ci:patch:Development,dev:patch:Development
27+
28+
- name: Create Release
29+
# v1.20.0
30+
uses: ncipollo/release-action@b7eabc95ff50cbeeedec83973935c8f306dfcd0b
31+
with:
32+
tag: ${{ steps.tag_version.outputs.new_tag }}
33+
name: ${{ steps.tag_version.outputs.new_tag }}
34+
body: ${{ steps.tag_version.outputs.changelog }}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: semantic-check
2+
on:
3+
pull_request_target:
4+
types:
5+
- opened
6+
- edited
7+
- synchronize
8+
9+
permissions:
10+
contents: read
11+
pull-requests: read
12+
13+
jobs:
14+
main:
15+
name: Semantic Commit Message Check
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout Code
19+
# v6.0.0
20+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3
21+
- name: Check PR for Semantic Commit Message
22+
# v6.1.1
23+
uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50
24+
env:
25+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
26+
with:
27+
requireScope: false
28+
validateSingleCommit: true

.github/workflows/test.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
name: test
2+
3+
on:
4+
pull_request:
5+
branches: [ main ]
6+
push:
7+
branches: [ main ]
8+
9+
permissions:
10+
contents: read
11+
pull-requests: write
12+
13+
env:
14+
TF_IN_AUTOMATION: true
15+
16+
jobs:
17+
lint:
18+
name: lint
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
24+
25+
- name: setup terraform
26+
uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
27+
28+
- name: Cache Terraform Plugins
29+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
30+
with:
31+
path: ${{ runner.temp }}/.terraform.d/plugin-cache
32+
key: tf-plugins-${{ runner.os }}-${{ hashFiles('**/.terraform.lock.hcl') }}
33+
34+
- name: Initialize Terraform
35+
run: terraform init
36+
37+
- name: Suggest Terraform Format
38+
if: github.event_name == 'pull_request'
39+
uses: reviewdog/action-suggester@fc4b06f8697e1e66bd66703f660005079be0b3dc # v1.24.0
40+
with:
41+
tool_name: terraform-fmt
42+
level: warning
43+
github_token: ${{ secrets.GITHUB_TOKEN }}
44+
fail_level: error
45+
46+
- name: Check Terraform Format
47+
if: github.event_name == 'push'
48+
run: terraform fmt -recursive -check
49+
50+
- name: Validate Terraform
51+
uses: reviewdog/action-terraform-validate@6f4d41dfe9cf0c095aec3d341110eadb4c90c360 # v1.16.1
52+
with:
53+
github_token: ${{ secrets.GITHUB_TOKEN }}
54+
reporter: github-pr-review
55+
level: warning
56+
fail_level: error
57+
58+
# - name: Lint Terraform
59+
# uses: reviewdog/action-tflint@9cbfc0aeae4af75fb73e8d5b6efbcd82e9483532 # v1.25.0
60+
# with:
61+
# reporter: github-pr-review
62+
# filter_mode: nofilter
63+
# fail_level: error
64+
65+
- name: Lint GitHub Actions
66+
uses: reviewdog/action-actionlint@2ca4336c1821eaff87db1f72fd3923b3250e0427 # v1.69.0
67+
with:
68+
reporter: github-pr-check
69+
fail_level: error
70+
filter_mode: nofilter
71+

.gitignore

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Local .terraform directories
2+
**/.terraform/*
3+
4+
# .tfstate files
5+
*.tfstate
6+
*.tfstate.*
7+
8+
# Crash log files
9+
crash.log
10+
crash.*.log
11+
12+
# Exclude all .tfvars files, which are likely to contain sensitive data
13+
*.tfvars
14+
*.tfvars.json
15+
16+
# Ignore override files as they are usually used to override resources locally
17+
override.tf
18+
override.tf.json
19+
*_override.tf
20+
*_override.tf.json
21+
22+
# Include override files you do wish to add to version control using negated pattern
23+
# !example_override.tf
24+
25+
# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan
26+
*tfplan*
27+
28+
# Ignore CLI configuration files
29+
.terraformrc
30+
terraform.rc
31+
32+
# IDE
33+
.idea/
34+
.vscode/
35+
*.swp
36+
*.swo
37+
*~
38+
39+
# OS
40+
.DS_Store
41+
Thumbs.db
42+
43+
# Environment variables
44+
.env
45+
.env.local
46+
47+
# Build artifacts
48+
dist/
49+
*.zip

.tflint.hcl

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
plugin "terraform" {
2+
enabled = true
3+
preset = "recommended"
4+
}
5+
6+
plugin "aws" {
7+
enabled = true
8+
version = "0.35.0"
9+
source = "github.com/terraform-linters/tflint-ruleset-aws"
10+
}
11+
12+
rule "terraform_naming_convention" {
13+
enabled = true
14+
}
15+
16+
rule "terraform_documented_variables" {
17+
enabled = true
18+
}
19+
20+
rule "terraform_documented_outputs" {
21+
enabled = true
22+
}
23+
24+
rule "terraform_typed_variables" {
25+
enabled = true
26+
}
27+
28+
rule "terraform_unused_declarations" {
29+
enabled = true
30+
}
31+
32+
rule "terraform_comment_syntax" {
33+
enabled = true
34+
}
35+
36+
rule "terraform_deprecated_index" {
37+
enabled = true
38+
}
39+
40+
rule "terraform_deprecated_interpolation" {
41+
enabled = true
42+
}
43+
44+
rule "terraform_required_version" {
45+
enabled = true
46+
}
47+
48+
rule "terraform_required_providers" {
49+
enabled = true
50+
}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 CruxStack LLC
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

0 commit comments

Comments
 (0)