Skip to content

Commit 9edffcd

Browse files
committed
chore: update pre-commit configurations
1 parent 8d5edde commit 9edffcd

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/nacl/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_network_acl_association` (optional)
77
- `aws_network_acl_rule` (optional)
88

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

1212
| Name | Version |
@@ -59,4 +59,4 @@ This module creates following resources.
5959
| <a name="output_owner_id"></a> [owner\_id](#output\_owner\_id) | The ID of the AWS account that owns the network ACL. |
6060
| <a name="output_subnets"></a> [subnets](#output\_subnets) | A list of subnet IDs which is associated with the network ACL. |
6161
| <a name="output_vpc_id"></a> [vpc\_id](#output\_vpc\_id) | The VPC ID of the network ACL. |
62-
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
62+
<!-- END_TF_DOCS -->

modules/nat-gateway/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_nat_gateway`
66
- `aws_eip` (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_secondary_private_ips"></a> [secondary\_private\_ips](#output\_secondary\_private\_ips) | The secondary private IP addresses of the NAT Gateway. |
6565
| <a name="output_subnet"></a> [subnet](#output\_subnet) | The subnet which the NAT Gateway belongs to.<br> `id` - The ID of the subnet.<br> `arn` - The ARN of the subnet. |
6666
| <a name="output_vpc_id"></a> [vpc\_id](#output\_vpc\_id) | The VPC ID of the NAT Gateway. |
67-
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
67+
<!-- END_TF_DOCS -->

modules/route-table/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This module creates following resources.
99
- `aws_vpc_endpoint_route_table_association` (optional)
1010
- `aws_vpn_gateway_route_propagation` (optional)
1111

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

1515
| Name | Version |
@@ -80,4 +80,4 @@ This module creates following resources.
8080
| <a name="output_prefix_list_routes"></a> [prefix\_list\_routes](#output\_prefix\_list\_routes) | A list of route rules for destinations to Prefix Lists. |
8181
| <a name="output_propagated_vpn_gateways"></a> [propagated\_vpn\_gateways](#output\_propagated\_vpn\_gateways) | A list of Virtual Private Gateway IDs which propagate routes from. |
8282
| <a name="output_vpc_id"></a> [vpc\_id](#output\_vpc\_id) | The ID of the VPC which the route table belongs to. |
83-
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
83+
<!-- END_TF_DOCS -->

modules/security-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_vpc_security_group_ingress_rule` (optional)
77
- `aws_vpc_security_group_egress_rule` (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_name"></a> [name](#output\_name) | The name of the security group. |
6363
| <a name="output_owner_id"></a> [owner\_id](#output\_owner\_id) | The ID of the AWS account that owns the security group. |
6464
| <a name="output_vpc_id"></a> [vpc\_id](#output\_vpc\_id) | The ID of the associated VPC. |
65-
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
65+
<!-- END_TF_DOCS -->

modules/subnet-group/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_neptune_subnet_group` (optional)
1313
- `aws_redshift_subnet_group` (optional)
1414

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

1818
| Name | Version |
@@ -110,4 +110,4 @@ This module creates following resources.
110110
| <a name="output_subnets_by_az"></a> [subnets\_by\_az](#output\_subnets\_by\_az) | A map of subnets of the subnet group which are grouped by availability zone id. |
111111
| <a name="output_transit_gateway_attachments"></a> [transit\_gateway\_attachments](#output\_transit\_gateway\_attachments) | The configuration of Transit Gateway VPC attachments. |
112112
| <a name="output_vpc_id"></a> [vpc\_id](#output\_vpc\_id) | The ID of the VPC which the subnet group belongs to. |
113-
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
113+
<!-- END_TF_DOCS -->

modules/vpc/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This module creates following resources.
1616
- `aws_vpn_gateway` (optional)
1717
- `aws_vpn_gateway_attachment` (optional)
1818

19-
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
19+
<!-- BEGIN_TF_DOCS -->
2020
## Requirements
2121

2222
| Name | Version |
@@ -108,4 +108,4 @@ This module creates following resources.
108108
| <a name="output_private_hosted_zones"></a> [private\_hosted\_zones](#output\_private\_hosted\_zones) | List of associated private Hosted Zone IDs. |
109109
| <a name="output_tenancy"></a> [tenancy](#output\_tenancy) | A tenancy option for instances launched into the VPC. |
110110
| <a name="output_vpn_gateway"></a> [vpn\_gateway](#output\_vpn\_gateway) | The configuration for the virtual private gateway of the VPC.<br> `id` - The ID of the Virtual Private Gateway.<br> `arn` - The ARN of the Virtual Private Gateway.<br> `asn` - The Autonomous System Number (ASN) for the Amazon side of the gateway. By default the virtual private gateway is created with the current default Amazon ASN. |
111-
<!-- END OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
111+
<!-- END_TF_DOCS -->

0 commit comments

Comments
 (0)