Skip to content

Commit c82e033

Browse files
committed
init commit
0 parents  commit c82e033

29 files changed

+1013
-0
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: 🐛 Bug Report
3+
about: If something isn't working as expected.
4+
5+
---
6+
7+
## Bug Report
8+
9+
### Steps to Reproduce:
10+
1. ...step 1 description...
11+
2. ...step 2 description...
12+
3. ...step 3 description...
13+
14+
### Expected Result:
15+
...description of what you expected to see...
16+
17+
### Actual Result:
18+
...what actually happened, including full exceptions (please include the entire stack trace, including "caused by" entries), log entries, screen shots etc. where appropriate...
19+
20+
### Environment:
21+
...version and build of the project, OS and runtime versions, virtualised environment (if any), etc. ...
22+
23+
### Additional Context:
24+
...add any other context about the problem here. If applicable, add screenshots to help explain...
+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
name: 🚀 Feature Request
3+
about: I have a suggestion and may want to implement it!
4+
5+
---
6+
7+
## Feature Request
8+
9+
### Description of Problem:
10+
...what is the *problem* you trying to solve that the project doesn't currently solve?
11+
12+
...please resist the temptation to describe your request in terms of a solution. Job Story form ("When [triggering condition], I want to [motivation/goal], so I can [outcome].") can help ensure you're expressing a problem statement.
13+
14+
### Potential Solutions:
15+
...clearly and concisely describe what you want to happen. Add any considered drawbacks.
16+
17+
... if you've considered alternatives, clearly and concisely describe those too.

.github/dependabot.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
reviewers:
8+
- "saidsef"
9+
pull-request-branch-name:
10+
separator: "-"
11+
- package-ecosystem: "terraform"
12+
directory: "/"
13+
schedule:
14+
interval: "weekly"
15+
reviewers:
16+
- "saidsef"
17+
pull-request-branch-name:
18+
separator: "-"

.github/workflows/ci.yaml

+95
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
10+
workflow_dispatch:
11+
12+
jobs:
13+
pre-commit:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
- uses: actions/setup-python@v4
18+
- uses: terraform-linters/setup-tflint@v3
19+
- uses: pre-commit/[email protected]
20+
with:
21+
extra_args: "-a"
22+
23+
validate:
24+
name: Validate
25+
needs: [pre-commit]
26+
runs-on: ubuntu-latest
27+
permissions:
28+
pull-requests: write
29+
strategy:
30+
fail-fast: true
31+
matrix:
32+
tf-version: ["1.0", "1.1", "1.2", "1.3", "1.4", "1.5", "latest"]
33+
steps:
34+
- name: Checkout code
35+
uses: actions/checkout@v3
36+
- name: Setup Terraform
37+
uses: hashicorp/setup-terraform@v2
38+
with:
39+
terraform_version: ${{ matrix.tf-version }}
40+
- name: Terraform Init
41+
run: |
42+
terraform init -backend=false -upgrade -reconfigure
43+
- name: Terraform FMT
44+
run: |
45+
terraform fmt -check -recursive
46+
- name: Terraform Validate
47+
run: |
48+
terraform validate
49+
- name: Terraform Version / Providers
50+
run: |
51+
terraform version
52+
terraform providers
53+
- name: Example Complete Validate
54+
run: |
55+
cd examples/complete
56+
terraform init -backend=false -upgrade -reconfigure
57+
terraform validate
58+
- name: Example Remote Validate
59+
run: |
60+
cd examples/remote
61+
terraform init -backend=false -upgrade -reconfigure
62+
terraform validate
63+
64+
tfsec:
65+
name: tfsec
66+
runs-on: ubuntu-latest
67+
permissions:
68+
pull-requests: write
69+
needs: [validate]
70+
steps:
71+
- name: Checkout code
72+
uses: actions/checkout@v3
73+
- name: tfsec
74+
uses: aquasecurity/[email protected]
75+
with:
76+
additional_args: "--force-all-dirs --concise-output --code-theme=dark"
77+
version: "latest"
78+
github_token: ${{ github.token }}
79+
80+
auto-approve:
81+
if: contains(github.event_name, 'pull_request')
82+
runs-on: ubuntu-latest
83+
needs: [validate, tfsec]
84+
steps:
85+
- name: Auto Approve PR
86+
uses: actions/github-script@v6
87+
with:
88+
github-token: ${{ github.token }}
89+
script: |
90+
github.rest.pulls.createReview({
91+
owner: context.repo.owner,
92+
repo: context.repo.repo,
93+
pull_number: context.issue.number,
94+
event: "APPROVE"
95+
})

.github/workflows/tfsec.yaml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: tfsec
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
schedule:
9+
- cron: '33 21 * * 1'
10+
11+
jobs:
12+
tfsec:
13+
name: Run tfsec sarif report
14+
runs-on: ubuntu-latest
15+
permissions:
16+
actions: read
17+
contents: read
18+
security-events: write
19+
steps:
20+
- name: Clone repo
21+
uses: actions/checkout@v3
22+
- name: Run tfsec
23+
uses: aquasecurity/tfsec-sarif-action@master
24+
with:
25+
sarif_file: tfsec.sarif
26+
- name: Upload SARIF file
27+
uses: github/codeql-action/upload-sarif@v2
28+
with:
29+
sarif_file: tfsec.sarif
30+
31+
remote:
32+
name: Remote example test
33+
runs-on: ubuntu-latest
34+
steps:
35+
- name: Clone repo
36+
uses: actions/checkout@v3
37+
- name: Setup Terraform
38+
uses: hashicorp/setup-terraform@v2
39+
with:
40+
terraform_version: 1.5
41+
- name: Example Remote Validate
42+
run: |
43+
cd examples/remote
44+
terraform init -backend=false -upgrade -reconfigure
45+
terraform validate

.gitignore

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
**/.terraform/*
2+
*.tfstate
3+
*.tfstate.*
4+
*_override.tf
5+
*_override.tf.json
6+
.terraform.lock.hcl
7+
.terraformrc
8+
.tfsec/
9+
crash.log
10+
override.tf
11+
override.tf.json
12+
terraform.rc

.pre-commit-config.yaml

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
repos:
2+
- repo: https://github.com/antonbabenko/pre-commit-terraform
3+
rev: v1.83.5
4+
hooks:
5+
- id: terraform_fmt
6+
- id: terraform_tflint
7+
args:
8+
- '--args=--only=terraform_deprecated_interpolation'
9+
- '--args=--only=terraform_deprecated_index'
10+
- '--args=--only=terraform_unused_declarations'
11+
- '--args=--only=terraform_comment_syntax'
12+
- '--args=--only=terraform_documented_outputs'
13+
- '--args=--only=terraform_documented_variables'
14+
- '--args=--only=terraform_typed_variables'
15+
- '--args=--only=terraform_module_pinned_source'
16+
- '--args=--only=terraform_naming_convention'
17+
- '--args=--only=terraform_required_version'
18+
- '--args=--only=terraform_required_providers'
19+
- '--args=--only=terraform_standard_module_structure'
20+
- '--args=--only=terraform_workspace_remote'
21+
- id: terraform_validate
22+
- repo: https://github.com/pre-commit/pre-commit-hooks
23+
rev: v4.5.0
24+
hooks:
25+
- id: check-added-large-files
26+
- id: check-byte-order-marker
27+
- id: check-case-conflict
28+
- id: check-executables-have-shebangs
29+
- id: check-merge-conflict
30+
- id: check-vcs-permalinks
31+
- id: check-yaml
32+
- id: detect-private-key
33+
- id: fix-byte-order-marker
34+
- id: mixed-line-ending
35+
- id: trailing-whitespace

CONTRIBUTING.md

+65
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
# Contributing
2+
3+
When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.
4+
5+
Please note we have a code of conduct, please follow it in all your interactions with the project.
6+
7+
## Pull Request Process
8+
9+
1. Ensure any install or build dependencies are removed before the end of the layer when doing a build.
10+
2. Update the README.md and/or TERRAFORM.md with details of changes to the interface, this includes new environment variables, useful file locations and parameters.
11+
3. Increase the version numbers is managed by the GitHub Actions CI workflow `tagging.yml`
12+
4. You may merge the Pull Request in once you have the sign-off of from the project team, or if you do not have permission to do that, you may request a reviewer to merge it for you.
13+
14+
## Code of Conduct
15+
16+
### Our Pledge
17+
18+
In the interest of fostering an open and welcoming environment, we as
19+
contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
20+
21+
### Our Standards
22+
23+
Examples of behavior that contributes to creating a positive environment include:
24+
25+
* Using welcoming and inclusive language
26+
* Being respectful of differing viewpoints and experiences
27+
* Gracefully accepting constructive criticism
28+
* Focusing on what is best for the community
29+
* Showing empathy towards other community members
30+
31+
Examples of unacceptable behavior by participants include:
32+
33+
* The use of sexualized language or imagery and unwelcome sexual attention or
34+
advances
35+
* Trolling, insulting/derogatory comments, and personal or political attacks
36+
* Public or private harassment
37+
* Publishing others' private information, such as a physical or electronic
38+
address, without explicit permission
39+
* Other conduct which could reasonably be considered inappropriate in a
40+
professional setting
41+
42+
### Our Responsibilities
43+
44+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
45+
46+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
47+
48+
### Scope
49+
50+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
51+
52+
### Enforcement
53+
54+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident.
55+
56+
Further details of specific enforcement policies may be posted separately.
57+
58+
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
59+
60+
### Attribution
61+
62+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
63+
64+
[homepage]: http://contributor-covenant.org
65+
[version]: http://contributor-covenant.org/version/1/4/

0 commit comments

Comments
 (0)