Skip to content

Commit 3be0c7b

Browse files
Initial commit
0 parents  commit 3be0c7b

28 files changed

+1060
-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+
[*.{tf,tfvars}]
18+
indent_size = 2
19+
indent_style = space
20+
21+
[*.md]
22+
max_line_length = 0
23+
trim_trailing_whitespace = false
24+
25+
[Makefile]
26+
tab_width = 2
27+
indent_style = tab
28+
29+
[COMMIT_EDITMSG]
30+
max_line_length = 0
31+
32+
[*.{yaml,yml}]
33+
max_line_length = 120

.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/ISSUE_TEMPLATE/bug_report.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: 'bug'
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Browser [e.g. chrome, safari]
29+
- Version [e.g. 22]
30+
31+
**Smartphone (please complete the following information):**
32+
- Device: [e.g. iPhone6]
33+
- OS: [e.g. iOS8.1]
34+
- Browser [e.g. stock browser, safari]
35+
- Version [e.g. 22]
36+
37+
**Additional context**
38+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: 'enhancement'
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
## Description
2+
3+
Please provide a brief description of the changes introduced by this pull request.
4+
5+
## Related Issue
6+
7+
- [Issue Number](link-to-issue): Brief description
8+
9+
## Checklist
10+
11+
Please ensure that the following steps are completed before submitting the pull request:
12+
13+
- [ ] Code follows the Terraform best practices and style guidelines.
14+
- [ ] Changes are appropriately documented, including any necessary updates to README or other documentation files.
15+
- [ ] Unit tests have been added or updated to cover the changes introduced by this pull request.
16+
- [ ] Changes have been tested locally and verified to work as expected.
17+
- [ ] The code has been reviewed to ensure it aligns with the project's goals and standards.
18+
- [ ] Dependencies and backward compatibility have been considered and addressed if applicable.
19+
20+
## Type of change
21+
22+
Please delete options that are not relevant.
23+
24+
- [ ] Bug fix (non-breaking change which fixes an issue)
25+
- [ ] New feature (non-breaking change which adds functionality)
26+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
27+
- [ ] Intermediate change (work in progress)
28+
29+
## Testing Instructions
30+
31+
Provide detailed steps or instructions for testing the changes introduced by this pull request.
32+
33+
## Screenshots
34+
35+
Include any relevant screenshots or visual aids to help reviewers understand the changes visually, if applicable.
36+
37+
## Additional Notes
38+
39+
Add any additional notes or context that might be helpful for reviewers or users testing the changes.

.github/workflows/pre-commit.yaml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
name: "Run Pre Commit Checks"
3+
4+
on: # yamllint disable-line rule:truthy
5+
push:
6+
branches:
7+
- "**"
8+
- "!main"
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
## run pre-commit
16+
pre-commit:
17+
name: Run pre-commit checks
18+
runs-on: ubuntu-latest
19+
permissions:
20+
contents: write
21+
pull-requests: write
22+
actions: write
23+
pages: write
24+
id-token: write
25+
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v4
29+
with:
30+
token: ${{ secrets.ARC_JOB_TOKEN }}
31+
32+
- uses: actions/setup-python@v3
33+
34+
- name: Install terraform-docs
35+
run: |
36+
cd /tmp
37+
curl -sSLo ./terraform-docs.tar.gz \
38+
https://terraform-docs.io/dl/v0.16.0/terraform-docs-v0.16.0-$(uname)-amd64.tar.gz
39+
tar -xzf terraform-docs.tar.gz
40+
rm terraform-docs.tar.gz
41+
chmod +x terraform-docs
42+
mv terraform-docs /usr/local/bin/terraform-docs
43+
- name: Install tflint
44+
run: |
45+
cd /tmp
46+
curl -s https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh | bash
47+
- name: Run pre-commit
48+
uses: pre-commit/action@v3.0.0
49+
continue-on-error: true # we want to push the changes pre-commit makes
50+
51+
- name: Push pre-commit changes to branch
52+
uses: stefanzweifel/git-auto-commit-action@v5
53+
with:
54+
commit_message: Push pre-commit changes

.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@v3
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 18
27+
uses: actions/setup-node@v3
28+
with:
29+
node-version: 18
30+
- name: install Snyk CLI
31+
run: npm install -g snyk
32+
- name: snyk monitor
33+
run: snyk iac test --report --severity-threshold=medium
34+
env:
35+
SNYK_TOKEN: ${{ secrets.ARC_SNYK_TOKEN }}

.github/workflows/tag-release.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: Bump version
3+
on: # yamllint disable-line rule:truthy
4+
push:
5+
branches:
6+
- main
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@master
12+
- name: Bump version and push tag
13+
id: tag
14+
uses: anothrNick/github-tag-action@master
15+
env:
16+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
17+
DEFAULT_BUMP: patch
18+
REPO_OWNER: sourcefuse
19+
- name: Create Release
20+
id: create_release
21+
uses: actions/create-release@v1.1.4
22+
env:
23+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
with:
25+
tag_name: ${{ steps.tag.outputs.tag }}
26+
release_name: v${{ steps.tag.outputs.tag }}
27+
body: ${{ github.release_notes }}
28+
draft: false
29+
prerelease: false

.github/workflows/tflint.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
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

.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

0 commit comments

Comments
 (0)