You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Copy file name to clipboardExpand all lines: README.md
+80-26
Original file line number
Diff line number
Diff line change
@@ -70,40 +70,94 @@ module "start_ec2_instance" {
70
70
*[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
71
71
*[test fixture](https://github.com/diodonfrost/terraform-aws-lambda-scheduler-stop-start/tree/master/examples/test_fixture) - Deploy environment for testing module
|[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
+
73
124
## Inputs
74
125
75
126
| Name | Description | Type | Default | Required |
| 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 |
| <aname="input_autoscaling_schedule"></a> [autoscaling\_schedule](#input\_autoscaling\_schedule)| Enable scheduling on autoscaling resources |`any`|`false`| no |
129
+
| <aname="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
+
| <aname="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
+
| <aname="input_cloudwatch_alarm_schedule"></a> [cloudwatch\_alarm\_schedule](#input\_cloudwatch\_alarm\_schedule)| Enable scheduleding on cloudwatch alarm resources |`any`|`false`| no |
132
+
| <aname="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
+
| <aname="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
+
| <aname="input_documentdb_schedule"></a> [documentdb\_schedule](#input\_documentdb\_schedule)| Enable scheduling on documentdb resources |`bool`|`false`| no |
135
+
| <aname="input_ec2_schedule"></a> [ec2\_schedule](#input\_ec2\_schedule)| Enable scheduling on ec2 resources |`any`|`false`| no |
136
+
| <aname="input_ecs_schedule"></a> [ecs\_schedule](#input\_ecs\_schedule)| Enable scheduling on ecs services |`bool`|`false`| no |
137
+
| <aname="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
+
| <aname="input_name"></a> [name](#input\_name)| Define name to use for lambda function, cloudwatch event and iam role |`string`| n/a | yes |
139
+
| <aname="input_rds_schedule"></a> [rds\_schedule](#input\_rds\_schedule)| Enable scheduling on rds resources |`any`|`false`| no |
140
+
| <aname="input_redshift_schedule"></a> [redshift\_schedule](#input\_redshift\_schedule)| Enable scheduling on redshift resources |`any`|`false`| no |
141
+
| <aname="input_resources_tag"></a> [resources\_tag](#input\_resources\_tag)| DEPRECATED, use scheduler\_tag variable instead |`map(string)`|`null`| no |
142
+
| <aname="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
+
| <aname="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
+
| <aname="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
+
| <aname="input_tags"></a> [tags](#input\_tags)| Custom tags on aws resources |`map(any)`|`null`| no |
93
146
94
147
## Outputs
95
148
96
149
| Name | Description |
97
150
|------|-------------|
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
+
| <aname="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
+
| <aname="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
+
| <aname="output_scheduler_lambda_arn"></a> [scheduler\_lambda\_arn](#output\_scheduler\_lambda\_arn)| The ARN of the Lambda function |
154
+
| <aname="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
+
| <aname="output_scheduler_lambda_function_version"></a> [scheduler\_lambda\_function\_version](#output\_scheduler\_lambda\_function\_version)| Latest published version of your Lambda function |
156
+
| <aname="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
+
| <aname="output_scheduler_lambda_name"></a> [scheduler\_lambda\_name](#output\_scheduler\_lambda\_name)| The name of the Lambda function |
158
+
| <aname="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
+
| <aname="output_scheduler_log_group_name"></a> [scheduler\_log\_group\_name](#output\_scheduler\_log\_group\_name)| The name of the scheduler log group |
0 commit comments