Skip to content

Commit dc177e6

Browse files
authored
Initial commit
0 parents  commit dc177e6

37 files changed

+1577
-0
lines changed

.github/dependabot.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
version: 2
2+
updates:
3+
4+
# GitHub actions
5+
- package-ecosystem: "github-actions"
6+
directory: "/" # For GitHub Actions "/" must be used for workflow files in ".github/workflows"
7+
schedule:
8+
interval: "weekly"
9+
commit-message:
10+
prefix: "chore: "
11+
labels:
12+
- "release/patch"
13+
14+
# Terraform
15+
- package-ecosystem: "terraform"
16+
directory: "/"
17+
schedule:
18+
interval: "weekly"
19+
commit-message:
20+
prefix: "chore: "
21+
labels:
22+
- "release/patch"
23+
24+
- package-ecosystem: "terraform"
25+
directory: "/examples/complete/"
26+
schedule:
27+
interval: "weekly"
28+
commit-message:
29+
prefix: "chore: "
30+
labels:
31+
- "release/patch"
32+
33+
- package-ecosystem: "terraform"
34+
directory: "/examples/simple/"
35+
schedule:
36+
interval: "weekly"
37+
commit-message:
38+
prefix: "chore: "
39+
labels:
40+
- "release/patch"

.github/workflows/pr-title.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Validate PR title
2+
3+
permissions:
4+
pull-requests: read
5+
statuses: write
6+
7+
on:
8+
pull_request_target:
9+
types:
10+
- opened
11+
- edited
12+
- synchronize
13+
14+
jobs:
15+
main:
16+
uses: getindata/github-workflows/.github/workflows/gh-validate-pr-title.yml@v1

.github/workflows/pre-commit.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: TF Pre-Commit
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
pull_request:
8+
branches:
9+
- main
10+
- master
11+
12+
jobs:
13+
main:
14+
uses: getindata/github-workflows/.github/workflows/tf-pre-commit.yml@v1

.github/workflows/release.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
name: Create new release with changelog
2+
3+
permissions:
4+
contents: write
5+
pull-requests: write
6+
7+
on:
8+
pull_request_target:
9+
types: [closed]
10+
11+
jobs:
12+
release:
13+
uses: getindata/github-workflows/.github/workflows/gh-create-release.yml@v1

.gitignore

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
### Terraform template
2+
# Local .terraform directories
3+
.terraform
4+
5+
# .tfstate files
6+
*.tfstate
7+
*.tfstate.*
8+
9+
# Crash log files
10+
crash.log
11+
12+
# terraform.lock.hcl files
13+
.terraform.lock.hcl
14+
15+
# Exclude all .tfvars files, which are likely to contain sentitive data, such as
16+
# password, private keys, and other secrets. These should not be part of version
17+
# control as they are data points which are potentially sensitive and subject
18+
# to change depending on the environment.
19+
#
20+
terraform.tfvars
21+
22+
# Ignore override files as they are usually used to override resources locally and so
23+
# are not checked in
24+
override.tf
25+
override.tf.json
26+
*_override.tf
27+
*_override.tf.json
28+
29+
# Include override files you do wish to add to version control using negated pattern
30+
#
31+
# !example_override.tf
32+
33+
# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan
34+
# example: *tfplan*
35+
*tfplan*

.pre-commit-config.yaml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
repos:
2+
- repo: https://github.com/gruntwork-io/pre-commit
3+
rev: "v0.1.23" # Get the latest from: https://github.com/gruntwork-io/pre-commit/releases
4+
hooks:
5+
- id: terraform-validate # It should be the first step as it runs terraform init required by tflint
6+
- id: terraform-fmt
7+
- id: tflint
8+
args:
9+
- "--config=__GIT_ROOT__/.tflint.hcl"
10+
11+
- repo: https://github.com/terraform-docs/terraform-docs
12+
rev: "v0.18.0" # Get the latest from: https://github.com/terraform-docs/terraform-docs/releases
13+
hooks:
14+
- id: terraform-docs-go
15+
args: ["."]
16+
17+
- repo: https://github.com/bridgecrewio/checkov.git
18+
rev: "3.2.216" # Get the latest from: https://github.com/bridgecrewio/checkov/releases
19+
hooks:
20+
- id: checkov
21+
args: [--skip-check, "CKV_TF_1"] # Terraform module sources do not use a git url with a commit hash revision
22+
23+
- repo: https://github.com/pre-commit/pre-commit-hooks
24+
rev: "v4.6.0" # Get the latest from: https://github.com/pre-commit/pre-commit-hooks/releases
25+
hooks:
26+
- id: check-merge-conflict
27+
args: ["--assume-in-merge"]
28+
- id: mixed-line-ending
29+
args: ["--fix=no"]
30+
- id: end-of-file-fixer
31+
- id: check-case-conflict
32+
- id: check-yaml

.terraform-docs.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
formatter: "md tbl" # this is required
2+
3+
version: ">= 0.14"
4+
5+
recursive:
6+
enabled: true
7+
path: ./examples
8+
9+
sections:
10+
hide: []
11+
show: [all]
12+
13+
content: |-
14+
{{ .Header }}
15+
16+
{{ .Footer }}
17+
18+
{{ .Inputs }}
19+
20+
{{ .Modules }}
21+
22+
{{ .Outputs }}
23+
24+
{{ .Providers }}
25+
26+
{{ .Requirements }}
27+
28+
{{ .Resources }}
29+
30+
output:
31+
file: "README.md"
32+
mode: inject
33+
template: |-
34+
<!-- BEGIN_TF_DOCS -->
35+
{{ .Content }}
36+
<!-- END_TF_DOCS -->
37+
38+
output-values:
39+
enabled: false
40+
from: ""
41+
42+
sort:
43+
enabled: true
44+
by: name
45+
46+
settings:
47+
anchor: true
48+
color: true
49+
default: true
50+
description: false
51+
escape: true
52+
hide-empty: false
53+
html: true
54+
indent: 2
55+
lockfile: false
56+
read-comments: true
57+
required: true
58+
sensitive: true
59+
type: true

.tflint.hcl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
rule "terraform_standard_module_structure" {
2+
enabled = false # Fails on context.tf
3+
}

CODEOWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# FILE PATTERN OWNER(S)
2+
* @getindata/devops-labs

CODE_OF_CONDUCT.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the
26+
overall community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or
31+
advances of any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email
35+
address, without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at
63+
64+
All complaints will be reviewed and investigated promptly and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series
86+
of actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or
93+
permanent ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within
113+
the community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.0, available at
119+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120+
121+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
122+
enforcement ladder](https://github.com/mozilla/diversity).
123+
124+
[homepage]: https://www.contributor-covenant.org
125+
126+
For answers to common questions about this code of conduct, see the FAQ at
127+
https://www.contributor-covenant.org/faq. Translations are available at
128+
https://www.contributor-covenant.org/translations.

0 commit comments

Comments
 (0)