From 185614ef0a2c581cf69ace6e48d4889afd8bd153 Mon Sep 17 00:00:00 2001 From: Ricardo Underwood Date: Tue, 29 Sep 2020 11:47:55 +0200 Subject: [PATCH] OPS-3896 Change listener rule due deprecation on aws provider vesion >= 3.0 - https://registry.terraform.io/providers/hashicorp/aws/latest/docs/guides/version-3-upgrade#resource-aws_lb_listener_rule --- main.tf | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/main.tf b/main.tf index 3030818..7a564e6 100644 --- a/main.tf +++ b/main.tf @@ -201,16 +201,18 @@ resource "aws_lb_listener_rule" "this" { dynamic condition { for_each = lookup(each.value, "path_match", "*") != "*" ? [1] : [] content { - field = "path-pattern" - values = [lookup(each.value, "path_match", "*")] + path_pattern { + values = [lookup(each.value, "path_match", "*")] + } } } dynamic condition { for_each = lookup(each.value, "host_match", "*") != "*" ? [1] : [] content { - field = "host-header" - values = [lookup(each.value, "host_match", "*")] + host_header { + values = [lookup(each.value, "host_match", "*")] + } } } }