Skip to content

Commit d3ee059

Browse files
committed
chore: update pre-commit configurations
1 parent 43cc245 commit d3ee059

File tree

15 files changed

+45
-31
lines changed

15 files changed

+45
-31
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/alb-instance-target-group/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_lb_target_group`
66
- `aws_lb_target_group_attachment` (optional)
77

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

1111
| Name | Version |
@@ -73,4 +73,4 @@ This module creates following resources.
7373
| <a name="output_targets"></a> [targets](#output\_targets) | A set of targets in the target group. |
7474
| <a name="output_type"></a> [type](#output\_type) | The target type of the target group. |
7575
| <a name="output_vpc_id"></a> [vpc\_id](#output\_vpc\_id) | The ID of the VPC which the target group belongs to. |
76-
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
76+
<!-- END_TF_DOCS -->

modules/alb-ip-target-group/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_lb_target_group`
66
- `aws_lb_target_group_attachment` (optional)
77

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

1111
| Name | Version |
@@ -76,4 +76,4 @@ This module creates following resources.
7676
| <a name="output_targets"></a> [targets](#output\_targets) | A set of targets in the target group. |
7777
| <a name="output_type"></a> [type](#output\_type) | The target type of the target group. |
7878
| <a name="output_vpc_id"></a> [vpc\_id](#output\_vpc\_id) | The ID of the VPC which the target group belongs to. |
79-
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
79+
<!-- END_TF_DOCS -->

modules/alb-lambda-target-group/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_lb_target_group_attachment` (optional)
77
- `aws_lambda_permission` (optional)
88

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

1212
| Name | Version |
@@ -61,4 +61,4 @@ This module creates following resources.
6161
| <a name="output_name"></a> [name](#output\_name) | The name of the target group. |
6262
| <a name="output_targets"></a> [targets](#output\_targets) | A list of targets in the target group. The Lambda target group is limited to a single Lambda function target. |
6363
| <a name="output_type"></a> [type](#output\_type) | The target type of the target group. |
64-
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
64+
<!-- END_TF_DOCS -->

modules/alb-listener/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_lb_listener_certificate` (optional)
77
- `aws_lb_listener_rule` (optional)
88

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

1212
| Name | Version |
@@ -63,4 +63,4 @@ This module creates following resources.
6363
| <a name="output_protocol"></a> [protocol](#output\_protocol) | The protocol for connections of the listener. |
6464
| <a name="output_rules"></a> [rules](#output\_rules) | The rules of the listener determine how the load balancer routes requests to the targets in one or more target groups. |
6565
| <a name="output_tls"></a> [tls](#output\_tls) | TLS configurations of the listener. |
66-
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
66+
<!-- END_TF_DOCS -->

modules/alb/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_lb_listener_certificate` (optional)
88
- `aws_lb_listener_rule` (optional)
99

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

1313
| Name | Version |
@@ -89,4 +89,4 @@ This module creates following resources.
8989
| <a name="output_type"></a> [type](#output\_type) | The type of the load balancer. Always return `APPLICATION`. |
9090
| <a name="output_vpc_id"></a> [vpc\_id](#output\_vpc\_id) | The VPC ID of the load balancer. |
9191
| <a name="output_zone_id"></a> [zone\_id](#output\_zone\_id) | The canonical hosted zone ID of the load balancer to be used in a Route 53 Alias record. |
92-
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
92+
<!-- END_TF_DOCS -->

modules/gwlb-instance-target-group/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_lb_target_group`
66
- `aws_lb_target_group_attachment` (optional)
77

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

1111
| Name | Version |
@@ -63,4 +63,4 @@ This module creates following resources.
6363
| <a name="output_targets"></a> [targets](#output\_targets) | A set of targets in the target group. |
6464
| <a name="output_type"></a> [type](#output\_type) | The target type of the target group. |
6565
| <a name="output_vpc_id"></a> [vpc\_id](#output\_vpc\_id) | The ID of the VPC which the target group belongs to. |
66-
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
66+
<!-- END_TF_DOCS -->

modules/gwlb-ip-target-group/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_lb_target_group`
66
- `aws_lb_target_group_attachment` (optional)
77

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

1111
| Name | Version |
@@ -64,4 +64,4 @@ This module creates following resources.
6464
| <a name="output_targets"></a> [targets](#output\_targets) | A set of targets in the target group. |
6565
| <a name="output_type"></a> [type](#output\_type) | The target type of the target group. |
6666
| <a name="output_vpc_id"></a> [vpc\_id](#output\_vpc\_id) | The ID of the VPC which the target group belongs to. |
67-
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
67+
<!-- END_TF_DOCS -->

modules/gwlb/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_lb`
66
- `aws_lb_listener` (optional)
77

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

1111
| Name | Version |
@@ -65,4 +65,4 @@ This module creates following resources.
6565
| <a name="output_subnets"></a> [subnets](#output\_subnets) | A list of subnet IDs attached to the load balancer. |
6666
| <a name="output_type"></a> [type](#output\_type) | The type of the load balancer. Always return `GATEWAY`. |
6767
| <a name="output_vpc_id"></a> [vpc\_id](#output\_vpc\_id) | The VPC ID of the load balancer. |
68-
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
68+
<!-- END_TF_DOCS -->

modules/nlb-alb-target-group/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_lb_target_group`
66
- `aws_lb_target_group_attachment` (optional)
77

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

1111
| Name | Version |
@@ -63,4 +63,4 @@ This module creates following resources.
6363
| <a name="output_targets"></a> [targets](#output\_targets) | A list of targets in the target group. The ALB target group is limited to a single Application Load Balancer target. |
6464
| <a name="output_type"></a> [type](#output\_type) | The target type of the target group. |
6565
| <a name="output_vpc_id"></a> [vpc\_id](#output\_vpc\_id) | The ID of the VPC which the target group belongs to. |
66-
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
66+
<!-- END_TF_DOCS -->

modules/nlb-instance-target-group/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_lb_target_group`
66
- `aws_lb_target_group_attachment` (optional)
77

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

1111
| Name | Version |
@@ -70,4 +70,4 @@ This module creates following resources.
7070
| <a name="output_targets"></a> [targets](#output\_targets) | A set of targets in the target group. |
7171
| <a name="output_type"></a> [type](#output\_type) | The target type of the target group. |
7272
| <a name="output_vpc_id"></a> [vpc\_id](#output\_vpc\_id) | The ID of the VPC which the target group belongs to. |
73-
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
73+
<!-- END_TF_DOCS -->

modules/nlb-ip-target-group/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_lb_target_group`
66
- `aws_lb_target_group_attachment` (optional)
77

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

1111
| Name | Version |
@@ -73,4 +73,4 @@ This module creates following resources.
7373
| <a name="output_targets"></a> [targets](#output\_targets) | A set of targets in the target group. |
7474
| <a name="output_type"></a> [type](#output\_type) | The target type of the target group. |
7575
| <a name="output_vpc_id"></a> [vpc\_id](#output\_vpc\_id) | The ID of the VPC which the target group belongs to. |
76-
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
76+
<!-- END_TF_DOCS -->

modules/nlb-listener/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_lb_listener`
66
- `aws_lb_listener_certificate` (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_port"></a> [port](#output\_port) | The port number on which the listener of load balancer is listening. |
5959
| <a name="output_protocol"></a> [protocol](#output\_protocol) | The protocol for connections of the listener. |
6060
| <a name="output_tls"></a> [tls](#output\_tls) | TLS configurations of the listener. |
61-
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
61+
<!-- END_TF_DOCS -->

modules/nlb/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_lb_listener` (optional)
77
- `aws_lb_listener_certificate` (optional)
88

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

1212
| Name | Version |
@@ -84,4 +84,4 @@ This module creates following resources.
8484
| <a name="output_type"></a> [type](#output\_type) | The type of the load balancer. Always return `NETWORK`. |
8585
| <a name="output_vpc_id"></a> [vpc\_id](#output\_vpc\_id) | The VPC ID of the load balancer. |
8686
| <a name="output_zone_id"></a> [zone\_id](#output\_zone\_id) | The canonical hosted zone ID of the load balancer to be used in a Route 53 Alias record. |
87-
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
87+
<!-- END_TF_DOCS -->

0 commit comments

Comments
 (0)