Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Condition blocks must be dynamic to support empty optional listener_http_header_conditions #42

Closed
jhosteny opened this issue Jan 27, 2021 · 0 comments · Fixed by #43
Closed
Labels
bug 🐛 An issue with the system

Comments

@jhosteny
Copy link
Contributor

Found a bug? Maybe our Slack Community can help.

Slack Community

Describe the Bug

#40 added support for optional HTTP headers. However, if none are supplied, the condition block is instantiated with no content.

Error: One of host_header, http_header, http_request_method, path_pattern, query_string or source_ip must be set in a condition block

  on .terraform/modules/ecs_web_app.alb_ingress/main.tf line 78, in resource "aws_lb_listener_rule" "authenticated_paths_oidc":
  78: resource "aws_lb_listener_rule" "authenticated_paths_oidc" {

Expected Behavior

The condition should not be added to the listener rule if there are no optional headers.

Steps to Reproduce

Apply the module with no optional headers

Screenshots

N/A

Environment (please complete the following information):

N/A

Additional Context

N/A

@jhosteny jhosteny added the bug 🐛 An issue with the system label Jan 27, 2021
jhosteny added a commit to thoroai/terraform-aws-alb-ingress that referenced this issue Jan 27, 2021
Guard the creation of the condition block on the length of the optional
listener_http_header_conditions.

Fixes cloudposse#42
 # Please enter the commit message for your changes. Lines starting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue with the system
Projects
None yet
1 participant