-
Notifications
You must be signed in to change notification settings - Fork 0
feat: additional functions and refactoring #23
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
base: main
Are you sure you want to change the base?
Conversation
| dynamic_environment_variables = var.which_lambda_function == "password_rotation" ? { | ||
| users = join(",", var.users) | ||
| instance_ids = join(",", var.instance_ids) | ||
| } : var.which_lambda_function == "log_exportation" ? { | ||
| cloudwatch_logs_export_bucket = var.cloudwatch_logs_export_bucket | ||
| } : {} |
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.
I feel like this might get annoying to scale as we add more functions using this ternary pattern.
I'd recommend moving this to multiple locals (one local for password_rotation_environment_variables, one local for log_exportation_environment_variables) and then merging them all in under environment_variables or another local if you wanted
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.
sounds better 👍
|
see thread below. I don't think we want that scenario anyway |
No description provided.