Condition fixed_response + host_header

Hello,

i am trying to use this nifty block

  resource "aws_lb_listener_rule" "fixed_response" {
  listener_arn = "${aws_lb_listener.http_external.arn}"
  priority     = 100
  action {
    type = "fixed-response"
    fixed_response {
      content_type = "text/plain"
      message_body = "I hear you knockin but you can't come in"
      status_code  = "404"
    }
  }
  condition {
    host_header {
      values = ["${var.system_domain}"]
    }
  }
}

whenever this is executed,
i get the error

Error: Unsupported block typeThis text will be hidden
  on load_balancers.tf line 61, in resource "aws_lb_listener_rule" "fixed_response":
  61:     host_header {
Blocks of type "host_header" are not expected here.

i’m using the old style now, but whats wrong with my block?

thanks in advance.

Hi @anishp55,

As far as I can tell, this block was added in version v2.42.0 of the AWS provider, which was only released four hours ago as I write this. Are you using an older version of the provider?

I got the same, and yep it was old provider. Thx.