File tree Expand file tree Collapse file tree 4 files changed +18
-1
lines changed
Expand file tree Collapse file tree 4 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ No requirements.
1616| ------| -------------| ------| ---------| :--------:|
1717| attribute\_ name | Name of the DynamoDB attribute | ` string ` | n/a | yes |
1818| cloudwatch\_ event\_ rule\_ name | Name of the CW event rule | ` string ` | n/a | yes |
19+ | cw\_ event\_ is\_ enabled | Mark if CW event rule is enabled or not | ` bool ` | n/a | yes |
1920| dynamodb\_ policy\_ name | Name of the DynamoDB iam policy | ` string ` | n/a | yes |
2021| function\_ name | Name of the aws lambda function | ` string ` | n/a | yes |
2122| handler | Handler for the aws lambda function, the structure should be the following --> filename.mainfunction | ` string ` | n/a | yes |
@@ -29,6 +30,9 @@ No requirements.
2930
3031## Outputs
3132
32- No output.
33+ | Name | Description |
34+ | ------| -------------|
35+ | function\_ arn | n/a |
36+ | function\_ invoke\_ arn | n/a |
3337
3438<!-- - END_TF_DOCS --->
Original file line number Diff line number Diff line change @@ -113,6 +113,7 @@ resource "aws_cloudwatch_event_rule" "event_rule" {
113113 name = var. cloudwatch_event_rule_name
114114 description = " Rule that triggers lambda function"
115115 schedule_expression = local. schedule_expression
116+ is_enabled = var. cw_event_is_enabled
116117}
117118
118119resource "aws_cloudwatch_event_target" "cloudwatch_event_target" {
Original file line number Diff line number Diff line change 1+ output "function_arn" {
2+ value = aws_lambda_function. lambda_function . arn
3+ }
4+
5+ output "function_invoke_arn" {
6+ value = aws_lambda_function. lambda_function . invoke_arn
7+ }
Original file line number Diff line number Diff line change @@ -57,4 +57,9 @@ variable "cloudwatch_event_rule_name" {
5757variable "lambda_role_name" {
5858 type = string
5959 description = " Name of the aws lambda execution role"
60+ }
61+
62+ variable "cw_event_is_enabled" {
63+ type = bool
64+ description = " Mark if CW event rule is enabled or not"
6065}
You can’t perform that action at this time.
0 commit comments