-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactored module to add one to many relationship for events to targets #2
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is a little confusing to me. Can you clarify the desired use case? My expectation would be that this module would create a single event rule, and associate many targets to that one rule. The variable definition doesn't match that though. So I think something somewhat foundational might be off about the implementation (or my expectation!)...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggesting a few more changes...
variables.tf
Outdated
@@ -1,20 +1,25 @@ | |||
variable "cloudwatch_rule" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the focus of this module is creating an event rule, what do you think about simplifying the variable a little, just making the event_rule object the top-level variable? (Also adding the name
attribute, as suggested elsewhere) I.e....
variable "event_rule" {
description = "Object of input configs for the CloudWatch Event Rule"
type = object({
name = string
description = optional(string)
event_pattern = optional(string)
event_targets = optional(list(object({
name = string
arn = string
event_bus_name = optional(string)
role_arn = optional(string)
target_id = optional(string)
dead_letter_config = optional(object({
arn = string
}))
input_transformer = optional(object({
input_paths = optional(map(string))
input_template = string
}))
})), [])
}))
}
07870d6
to
1695805
Compare
1695805
to
a4c42ff
Compare
No description provided.