https://pulumi.com logo
Title
c

chilly-hairdresser-56259

07/29/2020, 9:01 PM
Quick question. Trying to figure out how I would specify multiple Path Patterns for the AWS ALB ListenerRule. From the docs it appears that Values can be a Liststring however, when you attempt to supply multiple values the IDE indicates that only one value can be supplied. Just kinda curious as I haven't found a solution yet, and haven't found one digging through any examples.
t

tall-librarian-49374

07/29/2020, 9:11 PM
That’s strange, I would expect this to compile:
PathPattern = new ALB.Inputs.ListenerRuleConditionPathPatternArgs
{
   Values =
   {
       "v1", "v2"
   }
}
c

chilly-hairdresser-56259

07/29/2020, 9:16 PM
I'll try it again. I thought doing that too would work.
@tall-librarian-49374 I end up getting a stack trace for a goroutine. With a panic of
panic: fatal: A failure has occurred: Unexpected multiple elements in array with MaxItems=1
t

tall-librarian-49374

07/29/2020, 9:24 PM
Ah. So that’s a runtime error from the provider. Let me see…
List of exactly one pattern to match.
Not sure why it’s done like this, but…
c

chilly-hairdresser-56259

07/29/2020, 9:34 PM
Ill open a bug ticket. This feature needs to be supported otherwise we can't use c#.
t

tall-librarian-49374

07/29/2020, 9:34 PM
It’s not a C# thing
You’ll get the same behavior in other languages
c

chilly-hairdresser-56259

07/29/2020, 9:35 PM
Python supports two different values. Im just. converting the python to c#. Maybe I was thinking Terraform.
t

tall-librarian-49374

07/29/2020, 9:36 PM
Python docs say the same thing about “exactly one pattern”
c

chilly-hairdresser-56259

07/29/2020, 9:39 PM
Ill create a feature request.
Suppose the work around would be a new listener rule based off an array sent. ListenerRules willl get messy though
This would be use case.