Skip to content

Commit f757d8f

Browse files
authored
chore: sync with latest template state (#78)
This PR syncs the repository with the latest state from . **Changes include:** - Updated configuration files (.checkov.yaml, .markdownlint.yaml, etc.) - Updated GitHub workflows and templates - Updated linting and formatting configurations - Updated documentation templates
1 parent 0f35dae commit f757d8f

File tree

11 files changed

+70
-57
lines changed

11 files changed

+70
-57
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
# Order is important: the last matching pattern takes the most precedence
55

66
# These owners will be the default owners for everything
7-
* @masterpointio/masterpoint-open-source
7+
* @masterpointio/masterpoint-open-source

.github/workflows/lint.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ concurrency:
44
group: lint-${{ github.head_ref || github.run_id }}
55
cancel-in-progress: true
66

7-
on: pull_request
7+
on: pull_request_target
88

99
permissions:
1010
actions: read
@@ -20,6 +20,10 @@ jobs:
2020
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2121
- name: Trunk Check
2222
uses: trunk-io/trunk-action@4d5ecc89b2691705fd08c747c78652d2fc806a94 # v1.1.19
23+
env:
24+
# NOTE: inject the GITHUB_TOKEN for the trunk managed tflint linter
25+
# https://github.com/terraform-linters/tflint/blob/master/docs/user-guide/plugins.md#avoiding-rate-limiting
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2327

2428
conventional-title:
2529
runs-on: ubuntu-latest

.github/workflows/test.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ on:
66
- main
77
pull_request_target:
88

9-
env:
10-
SPACELIFT_API_KEY_ENDPOINT: ${{ secrets.SPACELIFT_API_KEY_ENDPOINT }}
11-
SPACELIFT_API_KEY_ID: ${{ secrets.SPACELIFT_API_KEY_ID }}
12-
SPACELIFT_API_KEY_SECRET: ${{ secrets.SPACELIFT_API_KEY_SECRET }}
13-
149
permissions:
1510
actions: read
1611
checks: write

.github/workflows/trunk-upgrade.yaml

Lines changed: 6 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -19,44 +19,10 @@ jobs:
1919
- name: Checkout
2020
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2121

22-
- name: Create Token for MasterpointBot App
23-
uses: tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a #v2.1.0
24-
id: generate-token
22+
- name: Run Trunk Upgrade
23+
uses: masterpointio/github-action-trunk-upgrade@v0.1.0
2524
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: Wait for checks to pass + Merge PR
38-
if: steps.trunk-upgrade.outputs.pull-request-number != ''
39-
env:
40-
GH_TOKEN: ${{ steps.generate-token.outputs.token }}
41-
PR_NUMBER: ${{ steps.trunk-upgrade.outputs.pull-request-number }}
42-
run: |
43-
echo "Waiting for required status checks to pass on PR #$PR_NUMBER..."
44-
while true; do
45-
CHECKS_JSON=$(gh pr checks "$PR_NUMBER" --required --json state,bucket)
46-
echo "Current checks status: $CHECKS_JSON"
47-
48-
if echo "$CHECKS_JSON" | jq -e '.[] | select(.bucket=="fail")' > /dev/null; then
49-
echo "One or more required checks have failed. Exiting..."
50-
exit 1
51-
fi
52-
53-
FAILED_OR_PENDING_CHECKS=$(echo "$CHECKS_JSON" | jq '[.[] | select(.state!="SUCCESS" or .bucket!="pass")] | length')
54-
if [ "$FAILED_OR_PENDING_CHECKS" -eq 0 ]; then
55-
echo "All required checks passed. Merging PR #$PR_NUMBER..."
56-
gh pr merge "$PR_NUMBER" --squash --delete-branch --admin
57-
break
58-
else
59-
echo "Some required checks are still running or pending. Retrying in 30s..."
60-
sleep 30
61-
fi
62-
done
25+
app-id: ${{ secrets.MP_BOT_APP_ID }}
26+
app-private-key: ${{ secrets.MP_BOT_APP_PRIVATE_KEY }}
27+
github-token: ${{ secrets.MASTERPOINT_TEAM_PAT }}
28+
reviewers: "@masterpointio/masterpoint-open-source"

.gitignore

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
# IDE/Editor settings
1717
**/.idea
1818
**/*.iml
19+
.cursor/
1920
.vscode/
2021
*.orig
2122
*.draft
@@ -39,8 +40,13 @@ backend.tf.json
3940

4041
# Other
4142
**/*.backup
42-
***/*.tmp
43+
**/*.tmp
4344
**/*.temp
4445
**/*.bak
4546
**/*.*swp
4647
**/.DS_Store
48+
49+
# AI code gen tools - we beleive engineers are responsible for the code they push no matter how it's generated
50+
.claude/*
51+
.cursor/*
52+
CLAUDE.md

.tflint.hcl

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
plugin "terraform" {
2+
enabled = true
3+
preset = "all"
4+
}
5+
6+
config {
7+
format = "compact"
8+
9+
# Inspect vars passed into "module" blocks. eg, lint AMI value passed into ec2 module.
10+
# https://github.com/terraform-linters/tflint/blob/master/docs/user-guide/calling-modules.md
11+
call_module_type = "all"
12+
13+
# default values but keeping them here for clarity
14+
disabled_by_default = false
15+
force = false
16+
}
17+
18+
# Installing tflint rulesets from Github requires setting a GITHUB_TOKEN
19+
# environment variable. Without it, you'll get an error like this:
20+
# $ tflint --init
21+
# Installing "aws" plugin...
22+
# Failed to install a plugin; Failed to fetch GitHub releases: GET https://api.github.com/repos/terraform-linters/tflint-ruleset-aws/releases/tags/v0.39.0: 401 Bad credentials []
23+
#
24+
# The solution is to provide a github PAT via a GITHUB_TOKEN env var,
25+
# export GITHUB_TOKEN=github_pat_120abc123def456ghi789jkl123mno456pqr789stu123vwx456yz789
26+
#
27+
# See docs for more info: https://github.com/terraform-linters/tflint/blob/master/docs/user-guide/plugins.md#avoiding-rate-limiting
28+
plugin "aws" {
29+
enabled = true
30+
version = "0.39.0"
31+
source = "github.com/terraform-linters/tflint-ruleset-aws"
32+
deep_check = false
33+
}
34+
35+
# Allow variables to exist in more files than ONLY variables.tf
36+
# Example use cases where we prefer for variables to exist in context,
37+
# - context.tf (applicable to the null-label module)
38+
# - providers.tf (when passing in secret keys from SOPs - example, github provider)
39+
# https://github.com/terraform-linters/tflint-ruleset-terraform/blob/main/docs/rules/terraform_standard_module_structure.md
40+
rule "terraform_standard_module_structure" {
41+
enabled = false
42+
}

.trunk/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
plugins
77
user_trunk.yaml
88
user.yaml
9-
tmp
9+
tmp

.trunk/trunk.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ cli:
77
plugins:
88
sources:
99
- id: trunk
10-
ref: v1.7.1
10+
ref: v1.7.0
1111
uri: https://github.com/trunk-io/plugins
1212
# Many linters and tools depend on runtimes - configure them here. (https://docs.trunk.io/runtimes)
1313
runtimes:
@@ -20,16 +20,16 @@ lint:
2020
# Incompatible with some Terraform features: https://github.com/tenable/terrascan/issues/1331
2121
- terrascan
2222
enabled:
23-
- renovate@41.46.3
24-
- tofu@1.10.3
23+
- renovate@40.36.2
24+
- tofu@1.9.1
2525
- actionlint@1.7.7
26-
- checkov@3.2.457
26+
- checkov@3.2.435
2727
- git-diff-check
2828
- markdownlint@0.45.0
29-
- prettier@3.6.2
30-
- tflint@0.58.1
31-
- trivy@0.64.1
32-
- trufflehog@3.90.2
29+
- prettier@3.5.3
30+
- tflint@0.58.0
31+
- trivy@0.63.0
32+
- trufflehog@3.88.35
3333
- yamllint@1.37.1
3434
ignore:
3535
- linters: [tofu]

0 commit comments

Comments
 (0)