Skip to content

Commit

Permalink
feat: use OR instead of ternary to be more clean
Browse files Browse the repository at this point in the history
  • Loading branch information
oycyc committed Nov 7, 2024
1 parent 1b40aa2 commit ef36231
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ resource "aws_lb_listener" "https" {
tags = merge(module.this.tags, var.listener_additional_tags)

default_action {
target_group_arn = var.listener_https_fixed_response != null ? null : var.listener_https_redirect != null ? null : one(aws_lb_target_group.default[*].arn)
target_group_arn = var.listener_https_fixed_response != null || var.listener_https_redirect != null ? null : one(aws_lb_target_group.default[*].arn)
type = var.listener_https_fixed_response != null ? "fixed-response" : var.listener_https_redirect != null ? "redirect" : "forward"

dynamic "fixed_response" {
Expand Down

0 comments on commit ef36231

Please sign in to comment.