Aws_cloudfront_distribution - ordered_cache_behavior not working as expected

Hello ,

We have problem with resource aws_cloudfront_distribution and ordered_cache_behavior. I have defined the header in AWS console but in my code no, the plan found OK.

When i add another behaviur all headers is reorder on aleatori mode in diferent behaviors (I have 22 behaviors). My workaround is specified the header in the code:

ordered_cache_behavior {
allowed_methods = [“GET”, “HEAD”]
cached_methods = [“GET”, “HEAD”]
compress = true
forwarded_values {
cookies {
forward = “none”
}
headers = [ “Host” ]
query_string = false
}
min_ttl = 60 #600
max_ttl = 180 #1800
default_ttl = 300 #900
path_pattern = “*.css”
target_origin_id = format(“%s-%s-%s”, var.name_comunidad, var.tags[“project”], var.tags[“environment”])
viewer_protocol_policy = “allow-all”
}

If i delete “headers = [ “Host” ]” the plan again is OK and we have problem with the control when add new behaviur.