Skip to content

Commit 7577cba

Browse files
committed
revert: Revert pre-commit configuration to previous versions
1 parent 746e08b commit 7577cba

File tree

1 file changed

+3
-36
lines changed

1 file changed

+3
-36
lines changed

.pre-commit-config.yaml

Lines changed: 3 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/antonbabenko/pre-commit-terraform
3-
rev: v1.99.4
3+
rev: v1.88.2
44
hooks:
55
- id: terraform_fmt
66
- id: terraform_wrapper_module_for_each
@@ -22,44 +22,11 @@ repos:
2222
- '--args=--only=terraform_required_providers'
2323
- '--args=--only=terraform_standard_module_structure'
2424
- '--args=--only=terraform_workspace_remote'
25+
- '--args=--only=terraform_unused_required_providers'
2526
- id: terraform_validate
26-
- id: terraform_tfsec
27-
args:
28-
- '--args=--soft-fail'
2927
- repo: https://github.com/pre-commit/pre-commit-hooks
30-
rev: v5.0.0
28+
rev: v4.5.0
3129
hooks:
3230
- id: check-merge-conflict
3331
- id: end-of-file-fixer
3432
- id: trailing-whitespace
35-
- id: check-yaml
36-
- repo: local
37-
hooks:
38-
- id: validate-opensearch-version
39-
name: Validate OpenSearch Engine Version
40-
entry: bash -c
41-
args:
42-
- |
43-
# Check for engine_version in Terraform files
44-
if grep -r "engine_version.*=" . --include="*.tf" | grep -v "null" | grep -v "variables.tf" | grep -v "#"; then
45-
echo "Found engine_version configurations:"
46-
grep -r "engine_version.*=" . --include="*.tf" | grep -v "null" | grep -v "variables.tf" | grep -v "#"
47-
echo ""
48-
echo "⚠️ VALIDATION: Please ensure engine_version follows format 'OpenSearch_X.Y'"
49-
echo "❌ BAD: OpenSearch_2_19_R20250630-P5 (software service version)"
50-
echo "✅ GOOD: OpenSearch_2.19 (engine version)"
51-
echo ""
52-
# Extract and validate versions
53-
versions=$(grep -r "engine_version.*=" . --include="*.tf" | grep -v "null" | grep -v "variables.tf" | grep -v "#" | sed 's/.*engine_version.*=.*"\([^"]*\)".*/\1/' | sort | uniq)
54-
for version in $versions; do
55-
if [[ $version =~ ^OpenSearch_[0-9]{1,2}\.[0-9]{1,2}$ ]] || [[ $version =~ ^Elasticsearch_[0-9]{1}\.[0-9]{1,2}$ ]]; then
56-
echo "✅ Valid version: $version"
57-
else
58-
echo "❌ Invalid version: $version"
59-
echo " Must match pattern: OpenSearch_X.Y or Elasticsearch_X.Y"
60-
exit 1
61-
fi
62-
done
63-
fi
64-
language: system
65-
pass_filenames: false

0 commit comments

Comments
 (0)