Skip to content

Not able to create alb listeners rule with multiple conditions #347

@Aniketvaidhya

Description

@Aniketvaidhya

Hello Team,

I am trying to create the alb listeners rule with the multiple condition in (my case first condition Path Pattern is /v2/* and second condition HTTP Header myapp-secret is myapp-secret-value).

I have tried the below configuration under the rules :
conditions = [{
path_patterns = ["/v2/*"],
http_header = {
http_header_name = "myapp-secret"
values = ["myapp-secret-value"]
}
}]

When I run the terraform plan, it is not able to identify the second condition and hence, only the condition path_patterns = ["/v2/*"] is applied to the listeners.

Alternately, I have also tried the below configuration :
conditions = [{
path_patterns = ["/v2/*"]
}]

 conditions = [{ http_header = { http_header_name = "myapp-secret" values = ["myapp-secret-value"] } }] 

In this case, after terraform plan I am getting this error :


│ Error: Insufficient condition blocks
│ ......
│ At least 1 "condition" blocks are required.

Can someone please confirm what I am missing or do I need to use some dynamic conditions here?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions