There is a 1024 character restriction set for the AWS aws_alb_listener_rule resource that is imposed here. I need to parameterise this character limit as the message body I want to send in the response is longer than 1024 characters.
I am new to terraform, is it possible to make such alterations to the .go code somewhere and bring this through to the aws_lb_listener_rule resource used in my terraform project?
Ideally I would have a resource like:
resource "aws_lb_listener_rule" "discovery" {
listener_arn = aws_lb_listener.func.arn
action {
type = "fixed-response"
fixed_response {
content_type = "application/json"
message_body = jsonencode(local.discovery)
status_code = "200",
message_body_chr_limit = 2000,
}
}
condition {
path_pattern {
values = [
"/discovery"]
}
}
tags = var.infra_tags
}
Is this possible to do? Or does it require PR to the AWS terraform project?
>Solution :
This is an AWS defined limit, so the answer is it cannot be done:
Length Constraints: Minimum length of 0. Maximum length of 1024.