Skip to content

Commit 6afe251

Browse files
authored
Updated pre-commit-terraform with terraform-docs 0.8.0 support (#65)
1 parent 3cc0ae3 commit 6afe251

File tree

4 files changed

+51
-23
lines changed

4 files changed

+51
-23
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: git://github.com/antonbabenko/pre-commit-terraform
3-
rev: v1.21.0
3+
rev: v1.23.0
44
hooks:
55
- id: terraform_fmt
66
- id: terraform_docs

README.md

Lines changed: 29 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -60,35 +60,43 @@ To run the tests:
6060
pytest functions/notify_slack_test.py
6161

6262
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
63+
## Providers
64+
65+
| Name | Version |
66+
|------|---------|
67+
| archive | n/a |
68+
| aws | n/a |
69+
| null | n/a |
70+
6371
## Inputs
6472

6573
| Name | Description | Type | Default | Required |
66-
|------|-------------|:----:|:-----:|:-----:|
67-
| cloudwatch\_log\_group\_kms\_key\_id | The ARN of the KMS Key to use when encrypting log data for Lambda | string | `"null"` | no |
68-
| cloudwatch\_log\_group\_retention\_in\_days | Specifies the number of days you want to retain log events in log group for Lambda. | number | `"0"` | no |
69-
| cloudwatch\_log\_group\_tags | Additional tags for the Cloudwatch log group | map(string) | `{}` | no |
70-
| create | Whether to create all resources | bool | `"true"` | no |
71-
| create\_sns\_topic | Whether to create new SNS topic | bool | `"true"` | no |
72-
| iam\_role\_tags | Additional tags for the IAM role | map(string) | `{}` | no |
73-
| kms\_key\_arn | ARN of the KMS key used for decrypting slack webhook url | string | `""` | no |
74-
| lambda\_description | The description of the Lambda function | string | `"null"` | no |
75-
| lambda\_function\_name | The name of the Lambda function to create | string | `"notify_slack"` | no |
76-
| lambda\_function\_tags | Additional tags for the Lambda function | map(string) | `{}` | no |
77-
| log\_events | Boolean flag to enabled/disable logging of incoming events | string | `"false"` | no |
78-
| reserved\_concurrent\_executions | The amount of reserved concurrent executions for this lambda function. A value of 0 disables lambda from being triggered and -1 removes any concurrency limitations | number | `"-1"` | no |
79-
| slack\_channel | The name of the channel in Slack for notifications | string | n/a | yes |
80-
| slack\_emoji | A custom emoji that will appear on Slack messages | string | `":aws:"` | no |
81-
| slack\_username | The username that will appear on Slack messages | string | n/a | yes |
82-
| slack\_webhook\_url | The URL of Slack webhook | string | n/a | yes |
83-
| sns\_topic\_name | The name of the SNS topic to create | string | n/a | yes |
84-
| sns\_topic\_tags | Additional tags for the SNS topic | map(string) | `{}` | no |
85-
| tags | A map of tags to add to all resources | map(string) | `{}` | no |
74+
|------|-------------|------|---------|:-----:|
75+
| cloudwatch\_log\_group\_kms\_key\_id | The ARN of the KMS Key to use when encrypting log data for Lambda | `string` | n/a | yes |
76+
| cloudwatch\_log\_group\_retention\_in\_days | Specifies the number of days you want to retain log events in log group for Lambda. | `number` | `0` | no |
77+
| cloudwatch\_log\_group\_tags | Additional tags for the Cloudwatch log group | `map(string)` | `{}` | no |
78+
| create | Whether to create all resources | `bool` | `true` | no |
79+
| create\_sns\_topic | Whether to create new SNS topic | `bool` | `true` | no |
80+
| iam\_role\_tags | Additional tags for the IAM role | `map(string)` | `{}` | no |
81+
| kms\_key\_arn | ARN of the KMS key used for decrypting slack webhook url | `string` | `""` | no |
82+
| lambda\_description | The description of the Lambda function | `string` | n/a | yes |
83+
| lambda\_function\_name | The name of the Lambda function to create | `string` | `"notify_slack"` | no |
84+
| lambda\_function\_tags | Additional tags for the Lambda function | `map(string)` | `{}` | no |
85+
| log\_events | Boolean flag to enabled/disable logging of incoming events | `bool` | `false` | no |
86+
| reserved\_concurrent\_executions | The amount of reserved concurrent executions for this lambda function. A value of 0 disables lambda from being triggered and -1 removes any concurrency limitations | `number` | `-1` | no |
87+
| slack\_channel | The name of the channel in Slack for notifications | `string` | n/a | yes |
88+
| slack\_emoji | A custom emoji that will appear on Slack messages | `string` | `":aws:"` | no |
89+
| slack\_username | The username that will appear on Slack messages | `string` | n/a | yes |
90+
| slack\_webhook\_url | The URL of Slack webhook | `string` | n/a | yes |
91+
| sns\_topic\_name | The name of the SNS topic to create | `string` | n/a | yes |
92+
| sns\_topic\_tags | Additional tags for the SNS topic | `map(string)` | `{}` | no |
93+
| tags | A map of tags to add to all resources | `map(string)` | `{}` | no |
8694

8795
## Outputs
8896

8997
| Name | Description |
9098
|------|-------------|
91-
| lambda\_cloudwatch\_log\_group\_arn | The Amazon Resource Name \(ARN\) specifying the log group |
99+
| lambda\_cloudwatch\_log\_group\_arn | The Amazon Resource Name (ARN) specifying the log group |
92100
| lambda\_iam\_role\_arn | The ARN of the IAM role used by Lambda function |
93101
| lambda\_iam\_role\_name | The name of the IAM role used by Lambda function |
94102
| notify\_slack\_lambda\_function\_arn | The ARN of the Lambda function |

examples/cloudwatch-alerts-to-slack/README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,16 @@ Note that in practice, encryption of the Slack webhook URL should happen differe
5656
Note that this example may create resources which can cost money. Run `terraform destroy` when you don't need these resources.
5757

5858
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
59+
## Providers
60+
61+
| Name | Version |
62+
|------|---------|
63+
| aws | n/a |
64+
65+
## Inputs
66+
67+
No input.
68+
5969
## Outputs
6070

6171
| Name | Description |

examples/notify-slack-simple/README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,21 @@ $ terraform apply
1919
Note that this example may create resources which can cost money (AWS Elastic IP, for example). Run `terraform destroy` when you don't need these resources.
2020

2121
<!-- BEGINNING OF PRE-COMMIT-TERRAFORM DOCS HOOK -->
22+
## Providers
23+
24+
| Name | Version |
25+
|------|---------|
26+
| aws | n/a |
27+
28+
## Inputs
29+
30+
No input.
31+
2232
## Outputs
2333

2434
| Name | Description |
2535
|------|-------------|
26-
| lambda\_cloudwatch\_log\_group\_arn | The Amazon Resource Name \(ARN\) specifying the log group |
36+
| lambda\_cloudwatch\_log\_group\_arn | The Amazon Resource Name (ARN) specifying the log group |
2737
| lambda\_iam\_role\_arn | The ARN of the IAM role used by Lambda function |
2838
| lambda\_iam\_role\_name | The name of the IAM role used by Lambda function |
2939
| notify\_slack\_lambda\_function\_arn | The ARN of the Lambda function |

0 commit comments

Comments
 (0)