Skip to content

Commit 6e288c5

Browse files
committed
chore: update pre-commit configurations
1 parent f0320e3 commit 6e288c5

File tree

8 files changed

+31
-17
lines changed

8 files changed

+31
-17
lines changed

.pre-commit-config.yaml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,39 @@
1+
default_install_hook_types:
2+
- pre-commit
3+
- commit-msg
4+
15
repos:
26
- repo: https://github.com/antonbabenko/pre-commit-terraform
37
rev: v1.97.4
48
hooks:
59
- id: terraform_fmt
10+
name: (terraform) Format .tf files with `terraform fmt`
611
args:
712
- --args=-diff
813
- id: terraform_validate
14+
name: (terraform) Check with `terraform validate`
915
args:
10-
- --tf-init-args=-upgrade
1116
- --hook-config=--retry-once-with-cleanup=true
12-
- id: terraform_providers_lock
13-
args:
14-
- --hook-config=--mode=always-regenerate-lockfile
17+
- --tf-init-args=-upgrade
1518
- id: terraform_tflint
19+
name: (terraform) Check with `tflint`
1620
args:
1721
- --args=--config=__GIT_WORKING_DIR__/.tflint.hcl
1822
files: ^modules/
1923
- id: terraform_docs
24+
name: (terraform) Generate docs with `terraform-docs`
2025
args: ["--args=--sort-by required"]
2126

2227
- repo: https://github.com/adrienverge/yamllint
2328
rev: v1.36.2
2429
hooks:
2530
- id: yamllint
31+
name: (yaml) Check with `yamllint`
32+
33+
- repo: https://github.com/compilerla/conventional-pre-commit
34+
rev: v4.0.0
35+
hooks:
36+
- id: conventional-pre-commit
37+
name: (commit-message) Check conventional commit
38+
stages: [commit-msg]
39+
args: []

.tflint.hcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ rule "terraform_unused_required_providers" {
7070

7171
plugin "aws" {
7272
source = "github.com/terraform-linters/tflint-ruleset-aws"
73-
version = "0.21.1"
73+
version = "0.38.0"
7474

7575
enabled = true
7676
deep_check = false

modules/access-analyzer/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This module creates following resources.
55
- `aws_accessanalyzer_analyzer`
66
- `aws_accessanalyzer_archive_rule` (optional)
77

8-
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
8+
<!-- BEGIN_TF_DOCS -->
99
## Requirements
1010

1111
| Name | Version |
@@ -58,4 +58,4 @@ This module creates following resources.
5858
| <a name="output_scope"></a> [scope](#output\_scope) | The scope of Analyzer. |
5959
| <a name="output_type"></a> [type](#output\_type) | The finding type of Analyzer. |
6060
| <a name="output_unused_access_tracking_period"></a> [unused\_access\_tracking\_period](#output\_unused\_access\_tracking\_period) | The scope of Analyzer. |
61-
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
61+
<!-- END_TF_DOCS -->

modules/cloudtrail-event-data-store/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This module creates following resources.
77
- `aws_iam_role_policy` (optional)
88
- `aws_iam_role_policy_attachment` (optional)
99

10-
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
10+
<!-- BEGIN_TF_DOCS -->
1111
## Requirements
1212

1313
| Name | Version |
@@ -72,4 +72,4 @@ This module creates following resources.
7272
| <a name="output_retention_in_days"></a> [retention\_in\_days](#output\_retention\_in\_days) | The retention period of the event data store, in days. |
7373
| <a name="output_scope"></a> [scope](#output\_scope) | The scope of the event data store to decide whether the event data store includes events from all regions, or only from the region in which the event data store is created. |
7474
| <a name="output_termination_protection_enabled"></a> [termination\_protection\_enabled](#output\_termination\_protection\_enabled) | Whether termination protection is enabled for the event data store. |
75-
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
75+
<!-- END_TF_DOCS -->

modules/cloudtrail-trail/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This module creates following resources.
77
- `aws_iam_role_policy` (optional)
88
- `aws_iam_role_policy_attachment` (optional)
99

10-
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
10+
<!-- BEGIN_TF_DOCS -->
1111
## Requirements
1212

1313
| Name | Version |
@@ -74,4 +74,4 @@ This module creates following resources.
7474
| <a name="output_management_event"></a> [management\_event](#output\_management\_event) | A selector for management events of the trail. |
7575
| <a name="output_name"></a> [name](#output\_name) | The name of the trail. |
7676
| <a name="output_scope"></a> [scope](#output\_scope) | The scope of the trail to decide whether the trail is multi-region trail. |
77-
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
77+
<!-- END_TF_DOCS -->

modules/config-managed-rule/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ This module creates following resources.
1010
- https://console.aws.amazon.com/config/service/managedRuleTemplate?region=ap-northeast-2
1111

1212

13-
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
13+
<!-- BEGIN_TF_DOCS -->
1414
## Requirements
1515

1616
| Name | Version |
@@ -74,4 +74,4 @@ This module creates following resources.
7474
| <a name="output_source_rule"></a> [source\_rule](#output\_source\_rule) | The information of the managed rule used. |
7575
| <a name="output_trigger_by_change"></a> [trigger\_by\_change](#output\_trigger\_by\_change) | The information of trigger by configuration changes. |
7676
| <a name="output_trigger_by_schedule"></a> [trigger\_by\_schedule](#output\_trigger\_by\_schedule) | The information of trigger by schedule. |
77-
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
77+
<!-- END_TF_DOCS -->

modules/config-recorder/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ This module creates following resources.
1212
- `aws_iam_role_policy`
1313
- `aws_iam_role_policy_attachment`
1414

15-
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
15+
<!-- BEGIN_TF_DOCS -->
1616
## Requirements
1717

1818
| Name | Version |
@@ -89,4 +89,4 @@ This module creates following resources.
8989
| <a name="output_scope"></a> [scope](#output\_scope) | A list that specifies the types of AWS resources for which AWS Config records configuration changes.<br> `strategy` - The recording strategy for the configuration recorder.<br> `resource_types` - A list of resource types to include/exclude for recording. |
9090
| <a name="output_service_role"></a> [service\_role](#output\_service\_role) | The Amazon Resource Name (ARN) of the IAM role for the recorder. |
9191
| <a name="output_snapshot_delivery"></a> [snapshot\_delivery](#output\_snapshot\_delivery) | The configuration for the configuration snapshot delivery of the recorder.<br> `enabled` - Whether the configuration snapshot delivery is enabled.<br> `frequency` - The frequency with which AWS Config recurringly delivers configuration snapshots. |
92-
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
92+
<!-- END_TF_DOCS -->

modules/macie-account/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This module creates following resources.
66
- `aws_macie2_member` (optional)
77
- `aws_macie2_classification_export_configuration` (optional)
88

9-
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
9+
<!-- BEGIN_TF_DOCS -->
1010
## Requirements
1111

1212
| Name | Version |
@@ -62,4 +62,4 @@ This module creates following resources.
6262
| <a name="output_service_role"></a> [service\_role](#output\_service\_role) | The Amazon Resource Name (ARN) of the service-linked role that allows Macie to monitor and analyze data in AWS resources for the account. |
6363
| <a name="output_update_frequency"></a> [update\_frequency](#output\_update\_frequency) | How often to publish updates to policy findings for the macie account. |
6464
| <a name="output_updated_at"></a> [updated\_at](#output\_updated\_at) | The date and time, in UTC and extended RFC 3339 format, of the most recent change to the status of the Macie account. |
65-
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
65+
<!-- END_TF_DOCS -->

0 commit comments

Comments
 (0)