Skip to content

Commit 5178910

Browse files
committed
docs: auto-generate README.md with terraform-docs
Generate module documentation using terraform-docs to ensure accurate and up-to-date documentation of all Terraform resources, inputs, outputs, and requirements. This improves maintainability and provides better visibility of module capabilities.
1 parent 23fb5b2 commit 5178910

File tree

1 file changed

+80
-26
lines changed

1 file changed

+80
-26
lines changed

README.md

+80-26
Original file line numberDiff line numberDiff line change
@@ -70,40 +70,94 @@ module "start_ec2_instance" {
7070
* [Rds aurora - mariadb scheduler](https://github.com/diodonfrost/terraform-aws-lambda-scheduler-stop-start/tree/master/examples/rds-scheduler) - Create lambda functions to stop rds mariadb and aurora cluster with tag `tostop = true` on Friday at 23:00 Gmt and start them on Monday at 07:00 GMT
7171
* [test fixture](https://github.com/diodonfrost/terraform-aws-lambda-scheduler-stop-start/tree/master/examples/test_fixture) - Deploy environment for testing module
7272

73+
<!-- BEGIN_TF_DOCS -->
74+
## Requirements
75+
76+
| Name | Version |
77+
|------|---------|
78+
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
79+
| <a name="requirement_archive"></a> [archive](#requirement\_archive) | 2.3.0 |
80+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.94.1 |
81+
82+
## Providers
83+
84+
| Name | Version |
85+
|------|---------|
86+
| <a name="provider_archive"></a> [archive](#provider\_archive) | 2.3.0 |
87+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.94.1 |
88+
89+
## Modules
90+
91+
No modules.
92+
93+
## Resources
94+
95+
| Name | Type |
96+
|------|------|
97+
| [aws_cloudwatch_event_rule.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_event_rule) | resource |
98+
| [aws_cloudwatch_event_target.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_event_target) | resource |
99+
| [aws_cloudwatch_log_group.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_log_group) | resource |
100+
| [aws_iam_role.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource |
101+
| [aws_iam_role_policy.autoscaling_group_scheduler](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy) | resource |
102+
| [aws_iam_role_policy.cloudwatch_alarm_scheduler](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy) | resource |
103+
| [aws_iam_role_policy.ecs_scheduler](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy) | resource |
104+
| [aws_iam_role_policy.instance_scheduler](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy) | resource |
105+
| [aws_iam_role_policy.lambda_logging](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy) | resource |
106+
| [aws_iam_role_policy.rds_scheduler](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy) | resource |
107+
| [aws_iam_role_policy.redshift_scheduler](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy) | resource |
108+
| [aws_iam_role_policy.resource_groups_tagging_api](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy) | resource |
109+
| [aws_iam_role_policy.spot_instance_scheduler](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy) | resource |
110+
| [aws_lambda_function.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda_function) | resource |
111+
| [aws_lambda_permission.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/lambda_permission) | resource |
112+
| [archive_file.this](https://registry.terraform.io/providers/hashicorp/archive/2.3.0/docs/data-sources/file) | data source |
113+
| [aws_iam_policy_document.autoscaling_group_scheduler](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
114+
| [aws_iam_policy_document.cloudwatch_alarm_scheduler](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
115+
| [aws_iam_policy_document.ecs_scheduler](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
116+
| [aws_iam_policy_document.instance_scheduler](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
117+
| [aws_iam_policy_document.rds_scheduler](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
118+
| [aws_iam_policy_document.redshift_scheduler](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
119+
| [aws_iam_policy_document.resource_groups_tagging_api](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
120+
| [aws_iam_policy_document.spot_instance_scheduler](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
121+
| [aws_iam_policy_document.this](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
122+
| [aws_region.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/region) | data source |
123+
73124
## Inputs
74125

75126
| Name | Description | Type | Default | Required |
76-
|------|-------------|------|---------|----------|
77-
| name | Define name to use for lambda function, cloudwatch event and iam role | string | n/a | yes |
78-
| custom_iam_role_arn | Custom IAM role arn for the scheduling lambda | string | null | no |
79-
| tags | Custom tags on aws resources | map | null | no |
80-
| kms_key_arn | The ARN for the KMS encryption key. If this configuration is not provided when environment variables are in use, AWS Lambda uses a default service key | string | null | no |
81-
| aws_regions | A list of one or more aws regions where the lambda will be apply, default use the current region | list | null | no |
82-
| cloudwatch_schedule_expression | The scheduling expression | string | `"cron(0 22 ? * MON-FRI *)"` | yes |
83-
| autoscaling_schedule | Enable scheduling on autoscaling resources | bool | `"false"` | no |
84-
| autoscaling_terminate_instances | Terminate instances when autoscaling group is scheduled to stop | bool | `"false"` | no |
85-
| documendb_schedule | Enable scheduling on documentdb resources | bool | `"false"` | no |
86-
| ec2_schedule | Enable scheduling on ec2 instance resources | bool | `"false"` | no |
87-
| ecs_schedule | Enable scheduling on ecs services resources | bool | `"false"` | no |
88-
| rds_schedule | Enable scheduling on rds resources | bool | `"false"` | no |
89-
| redshift_schedule | Enable scheduling on redshift resources | bool | `"false"` | no |
90-
| cloudwatch_alarm_schedule | Enable scheduleding on cloudwatch alarm resources | bool | `"false"` | no |
91-
| schedule_action | Define schedule action to apply on resources | string | `"stop"` | yes |
92-
| scheduler_tag | Set the tag to use for identify aws resources to stop or start | map | {"key" = "tostop", "value" = "true"} | yes |
127+
|------|-------------|------|---------|:--------:|
128+
| <a name="input_autoscaling_schedule"></a> [autoscaling\_schedule](#input\_autoscaling\_schedule) | Enable scheduling on autoscaling resources | `any` | `false` | no |
129+
| <a name="input_autoscaling_terminate_instances"></a> [autoscaling\_terminate\_instances](#input\_autoscaling\_terminate\_instances) | Terminate instances when autoscaling group is scheduled to stop | `bool` | `false` | no |
130+
| <a name="input_aws_regions"></a> [aws\_regions](#input\_aws\_regions) | A list of one or more aws regions where the lambda will be apply, default use the current region | `list(string)` | `null` | no |
131+
| <a name="input_cloudwatch_alarm_schedule"></a> [cloudwatch\_alarm\_schedule](#input\_cloudwatch\_alarm\_schedule) | Enable scheduleding on cloudwatch alarm resources | `any` | `false` | no |
132+
| <a name="input_cloudwatch_schedule_expression"></a> [cloudwatch\_schedule\_expression](#input\_cloudwatch\_schedule\_expression) | Define the aws cloudwatch event rule schedule expression | `string` | `"cron(0 22 ? * MON-FRI *)"` | no |
133+
| <a name="input_custom_iam_role_arn"></a> [custom\_iam\_role\_arn](#input\_custom\_iam\_role\_arn) | Custom IAM role arn for the scheduling lambda | `string` | `null` | no |
134+
| <a name="input_documentdb_schedule"></a> [documentdb\_schedule](#input\_documentdb\_schedule) | Enable scheduling on documentdb resources | `bool` | `false` | no |
135+
| <a name="input_ec2_schedule"></a> [ec2\_schedule](#input\_ec2\_schedule) | Enable scheduling on ec2 resources | `any` | `false` | no |
136+
| <a name="input_ecs_schedule"></a> [ecs\_schedule](#input\_ecs\_schedule) | Enable scheduling on ecs services | `bool` | `false` | no |
137+
| <a name="input_kms_key_arn"></a> [kms\_key\_arn](#input\_kms\_key\_arn) | The ARN for the KMS encryption key. If this configuration is not provided when environment variables are in use, AWS Lambda uses a default service key. | `string` | `null` | no |
138+
| <a name="input_name"></a> [name](#input\_name) | Define name to use for lambda function, cloudwatch event and iam role | `string` | n/a | yes |
139+
| <a name="input_rds_schedule"></a> [rds\_schedule](#input\_rds\_schedule) | Enable scheduling on rds resources | `any` | `false` | no |
140+
| <a name="input_redshift_schedule"></a> [redshift\_schedule](#input\_redshift\_schedule) | Enable scheduling on redshift resources | `any` | `false` | no |
141+
| <a name="input_resources_tag"></a> [resources\_tag](#input\_resources\_tag) | DEPRECATED, use scheduler\_tag variable instead | `map(string)` | `null` | no |
142+
| <a name="input_runtime"></a> [runtime](#input\_runtime) | The runtime environment for the Lambda function that you are uploading. For example, python3.8 | `string` | `"python3.10"` | no |
143+
| <a name="input_schedule_action"></a> [schedule\_action](#input\_schedule\_action) | Define schedule action to apply on resources, accepted value are 'stop or 'start | `string` | `"stop"` | no |
144+
| <a name="input_scheduler_tag"></a> [scheduler\_tag](#input\_scheduler\_tag) | Set the tag to use for identify aws resources to stop or start | `map(string)` | <pre>{<br/> "key": "tostop",<br/> "value": "true"<br/>}</pre> | no |
145+
| <a name="input_tags"></a> [tags](#input\_tags) | Custom tags on aws resources | `map(any)` | `null` | no |
93146

94147
## Outputs
95148

96149
| Name | Description |
97150
|------|-------------|
98-
| lambda_iam_role_arn | The ARN of the IAM role used by Lambda function |
99-
| lambda_iam_role_name | The name of the IAM role used by Lambda function |
100-
| scheduler_lambda_arn | The ARN of the Lambda function |
101-
| scheduler_lambda_name | The name of the Lambda function |
102-
| scheduler_lambda_invoke_arn | The ARN to be used for invoking Lambda function from API Gateway |
103-
| scheduler_lambda_function_last_modified | The date Lambda function was last modified |
104-
| scheduler_lambda_function_version | Latest published version of your Lambda function |
105-
| scheduler_log_group_name | The name of the scheduler log group |
106-
| scheduler_log_group_arn | The Amazon Resource Name (ARN) specifying the log group |
151+
| <a name="output_lambda_iam_role_arn"></a> [lambda\_iam\_role\_arn](#output\_lambda\_iam\_role\_arn) | The ARN of the IAM role used by Lambda function |
152+
| <a name="output_lambda_iam_role_name"></a> [lambda\_iam\_role\_name](#output\_lambda\_iam\_role\_name) | The name of the IAM role used by Lambda function |
153+
| <a name="output_scheduler_lambda_arn"></a> [scheduler\_lambda\_arn](#output\_scheduler\_lambda\_arn) | The ARN of the Lambda function |
154+
| <a name="output_scheduler_lambda_function_last_modified"></a> [scheduler\_lambda\_function\_last\_modified](#output\_scheduler\_lambda\_function\_last\_modified) | The date Lambda function was last modified |
155+
| <a name="output_scheduler_lambda_function_version"></a> [scheduler\_lambda\_function\_version](#output\_scheduler\_lambda\_function\_version) | Latest published version of your Lambda function |
156+
| <a name="output_scheduler_lambda_invoke_arn"></a> [scheduler\_lambda\_invoke\_arn](#output\_scheduler\_lambda\_invoke\_arn) | The ARN to be used for invoking Lambda function from API Gateway |
157+
| <a name="output_scheduler_lambda_name"></a> [scheduler\_lambda\_name](#output\_scheduler\_lambda\_name) | The name of the Lambda function |
158+
| <a name="output_scheduler_log_group_arn"></a> [scheduler\_log\_group\_arn](#output\_scheduler\_log\_group\_arn) | The Amazon Resource Name (ARN) specifying the log group |
159+
| <a name="output_scheduler_log_group_name"></a> [scheduler\_log\_group\_name](#output\_scheduler\_log\_group\_name) | The name of the scheduler log group |
160+
<!-- END_TF_DOCS -->
107161

108162
## Tests
109163

0 commit comments

Comments
 (0)