Skip to content

Commit 06933d4

Browse files
authored
Initial commit
0 parents  commit 06933d4

28 files changed

+1185
-0
lines changed

.coderabbit.yaml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
# Docs: https://docs.coderabbit.ai/configure-coderabbit
2+
# Schema: https://coderabbit.ai/integrations/schema.v2.json
3+
# Support: https://discord.gg/GsXnASn26c
4+
5+
language: en
6+
7+
tone_instructions: |
8+
Provide feedback in a professional, friendly, constructive, and concise tone.
9+
Offer clear, specific suggestions and best practices to help enhance the code quality and promote learning.
10+
Be concise and only comment on significant issues.
11+
12+
early_access: true
13+
14+
knowledge_base:
15+
# The scope of learnings to use for the knowledge base.
16+
# `local` uses the repository's learnings,
17+
# `global` uses the organization's learnings,
18+
# `auto` uses repository's learnings for public repositories and organization's learnings for private repositories.
19+
# Default value: `auto`
20+
learnings:
21+
scope: global
22+
issues:
23+
scope: global
24+
pull_requests:
25+
scope: global
26+
27+
reviews:
28+
profile: chill
29+
auto_review:
30+
# Disable incremental code review on each push
31+
auto_incremental_review: false
32+
# The keywords are case-insensitive
33+
ignore_title_keywords:
34+
- wip
35+
- draft
36+
- test
37+
commit_status: false
38+
path_instructions:
39+
- path: "**/*.tf"
40+
instructions: |
41+
You're a Terraform expert who has thoroughly studied all the documentation from Hashicorp https://developer.hashicorp.com/terraform/docs and OpenTofu https://opentofu.org/docs/.
42+
You have a strong grasp of Terraform syntax and prioritize providing accurate and insightful code suggestions.
43+
As a fan of the Cloud Posse / SweetOps ecosystem, you incorporate many of their best practices https://docs.cloudposse.com/best-practices/terraform/ while balancing them with general Terraform guidelines.
44+
changed_files_summary: false
45+
poem: false
46+
# Don't post review details on each review.
47+
review_status: false
48+
sequence_diagrams: false
49+
tools:
50+
# By default, all tools are enabled.
51+
# Masterpoint uses Trunk (https://trunk.io) so we do not need a lot of this feedback due to overlap.
52+
shellcheck:
53+
enabled: false
54+
ruff:
55+
enabled: false
56+
markdownlint:
57+
enabled: false
58+
github-checks:
59+
enabled: false
60+
languagetool:
61+
enabled: false
62+
biome:
63+
enabled: false
64+
hadolint:
65+
enabled: false
66+
swiftlint:
67+
enabled: false
68+
phpstan:
69+
enabled: false
70+
golangci-lint:
71+
enabled: false
72+
yamllint:
73+
enabled: false
74+
gitleaks:
75+
enabled: false
76+
checkov:
77+
enabled: false
78+
detekt:
79+
enabled: false
80+
eslint:
81+
enabled: false
82+
rubocop:
83+
enabled: false
84+
buf:
85+
enabled: false
86+
regal:
87+
enabled: false
88+
actionlint:
89+
enabled: false
90+
pmd:
91+
enabled: false
92+
cppcheck:
93+
enabled: false
94+
circleci:
95+
enabled: false

.editorconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Unix-style newlines with a newline ending every file
2+
[*]
3+
charset = utf-8
4+
end_of_line = lf
5+
indent_size = 2
6+
indent_style = space
7+
insert_final_newline = true
8+
trim_trailing_whitespace = true
9+
10+
[*.md]
11+
max_line_length = 0
12+
13+
[COMMIT_EDITMSG]
14+
max_line_length = 0

.github/CODEOWNERS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Use this file to define individuals or teams that are responsible for code in a repository.
2+
# Read more: <https://help.github.com/articles/about-codeowners/>
3+
#
4+
# Order is important: the last matching pattern takes the most precedence
5+
6+
# These owners will be the default owners for everything
7+
* @masterpointio/masterpoint-open-source

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
## what
2+
3+
- Describe high-level what changed as a result of these commits (i.e. in plain-english, what do these changes mean?)
4+
- Use bullet points to be concise and to the point.
5+
6+
## why
7+
8+
- Provide the justifications for the changes (e.g. business case).
9+
- Describe why these changes were made (e.g. why do these commits fix the problem?)
10+
- Use bullet points to be concise and to the point.
11+
12+
## references
13+
14+
- Link to any supporting GitHub issues or helpful documentation to add some context (e.g. Stackoverflow).
15+
- Use `closes #123`, if this PR closes a GitHub issue `#123`

.github/renovate.json5

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
{
2+
"extends": [
3+
"config:best-practices",
4+
"github>aquaproj/aqua-renovate-config#2.7.5"
5+
],
6+
"enabledManagers": [
7+
"terraform",
8+
"github-actions"
9+
],
10+
"terraform": {
11+
"ignorePaths": [
12+
"**/context.tf" // Mixin file https://github.com/cloudposse/terraform-null-label/blob/main/exports/context.tf
13+
],
14+
"fileMatch": [
15+
"\\.tf$",
16+
"\\.tofu$"
17+
]
18+
},
19+
"schedule": [
20+
"after 9am on the first day of the month"
21+
],
22+
"assigneesFromCodeOwners": true,
23+
"dependencyDashboardAutoclose": true,
24+
"addLabels": ["{{manager}}"],
25+
"packageRules": [
26+
{
27+
"matchManagers": ["github-actions"],
28+
"matchUpdateTypes": ["minor", "patch", "pin", "digest"],
29+
"automerge": true,
30+
"automergeType": "branch",
31+
"groupName": "github-actions-auto-upgrade",
32+
"addLabels": ["auto-upgrade"]
33+
},
34+
{
35+
"matchManagers": ["github-actions"],
36+
"matchUpdateTypes": ["major"],
37+
"groupName": "github-actions-needs-review",
38+
"addLabels": ["needs-review"]
39+
},
40+
{
41+
"matchManagers": ["terraform"],
42+
"groupName": "tf",
43+
"addLabels": ["needs-review"]
44+
},
45+
{
46+
"matchFileNames": ["**/*.tofu", "**/*.tf"],
47+
"matchDatasources": ["terraform-provider", "terraform-module"],
48+
"registryUrls": ["https://registry.opentofu.org"],
49+
"groupName": "tf"
50+
},
51+
{
52+
"matchFileNames": ["**/*.tofu"],
53+
"matchDepTypes": ["required_version"],
54+
"registryUrls": ["https://registry.opentofu.org"],
55+
"groupName": "tf"
56+
},
57+
{
58+
"matchFileNames": ["**/*.tf"],
59+
"matchDepTypes": ["required_version"],
60+
"registryUrls": ["https://registry.terraform.io"],
61+
"groupName": "tf"
62+
}
63+
]
64+
}

.github/workflows/lint.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Lint
2+
3+
on: pull_request
4+
5+
permissions:
6+
actions: read
7+
checks: write
8+
contents: read
9+
pull-requests: read
10+
11+
jobs:
12+
lint:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Check out Git repository
16+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
17+
- name: Trunk Check
18+
uses: trunk-io/trunk-action@4d5ecc89b2691705fd08c747c78652d2fc806a94 # v1.1.19

.github/workflows/release-please.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Release Please
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
issues: write
12+
13+
jobs:
14+
release-please:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: googleapis/release-please-action@7987652d64b4581673a76e33ad5e98e3dd56832f #v4.1.3
18+
with:
19+
release-type: terraform-module

.github/workflows/test.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: TF Test
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
9+
permissions:
10+
actions: read
11+
checks: write
12+
contents: read
13+
id-token: write
14+
pull-requests: read
15+
16+
jobs:
17+
tf-test:
18+
name: 🧪 ${{ matrix.tf }} test
19+
runs-on: ubuntu-latest
20+
strategy:
21+
matrix:
22+
tf: [tofu, terraform]
23+
steps:
24+
- uses: masterpointio/github-action-tf-test@c3b619f3bca9e4f482b9e0fb3166ab3f02d9d54c # v1.0.0
25+
with:
26+
tf_type: ${{ matrix.tf }}
27+
aws_role_arn: ${{ vars.TF_TEST_AWS_ROLE_ARN }}
28+
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/trunk-upgrade.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Trunk Upgrade
2+
3+
on:
4+
schedule:
5+
# On the first day of every month @ 8am
6+
- cron: 0 8 1 * *
7+
workflow_dispatch: {}
8+
9+
permissions: read-all
10+
11+
jobs:
12+
trunk-upgrade:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
# For trunk to create PRs
16+
contents: write
17+
pull-requests: write
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
21+
22+
- name: Create Token for MasterpointBot App
23+
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a #v2.1.0
24+
id: generate-token
25+
with:
26+
app_id: ${{ secrets.MP_BOT_APP_ID }}
27+
private_key: ${{ secrets.MP_BOT_APP_PRIVATE_KEY }}
28+
29+
- name: Upgrade
30+
id: trunk-upgrade
31+
uses: trunk-io/trunk-action/upgrade@4d5ecc89b2691705fd08c747c78652d2fc806a94 # v1.1.19
32+
with:
33+
github-token: ${{ steps.generate-token.outputs.token }}
34+
reviewers: "@masterpointio/masterpoint-internal"
35+
prefix: "chore: "
36+
37+
- name: Merge PR automatically
38+
if: steps.trunk-upgrade.outputs.pull-request-number != ''
39+
env:
40+
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
41+
PR_NUMBER: ${{ steps.trunk-upgrade.outputs.pull-request-number }}
42+
run: |
43+
gh pr merge "$PR_NUMBER" --squash --auto --delete-branch

.gitignore

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Ignore override files as they are usually used to override resources locally
2+
*override.tf
3+
*override.tf.json
4+
5+
# .tfstate files
6+
*.tfstate
7+
*.tfstate.*
8+
9+
# Local .terraform directories
10+
**/.terraform/*
11+
12+
# Ignore the root .terraform.lock.hcl file (Child modules don't want this)
13+
.terraform.lock.hcl
14+
!examples/**/.terraform.lock.hcl
15+
16+
# IDE/Editor settings
17+
**/.idea
18+
**/*.iml
19+
.vscode/
20+
*.orig
21+
*.draft
22+
*~
23+
24+
# Build Harness https://github.com/cloudposse/build-harness
25+
**/.build-harness
26+
**/build-harness
27+
28+
# Log files
29+
*.log
30+
31+
# Output from other tools that might be used alongside Terraform/OpenTofu
32+
*.tfvars.json
33+
backend.tf.json
34+
35+
# Taskit files
36+
.taskit/
37+
.task/
38+
.env.taskit-secrets
39+
40+
# Other
41+
**/*.backup
42+
***/*.tmp
43+
**/*.temp
44+
**/*.bak
45+
**/*.*swp
46+
**/.DS_Store

0 commit comments

Comments
 (0)