fast-vr-6049
10/23/2023, 10:47 PMRights
property's types are misbehaving. Its requirements are pretty nested: Pulumi.InputList<Pulumi.Union<string,Pulumi.AzureNative.ServiceBus.AccessRights>>
. If I provide the input shown in the docs, I get this issue in response:
var serviceBusAuthorizationRule = new QueueAuthorizationRule("p4-ado-sync-queue-auth", new ()
{
ResourceGroupName = resourceGroup.Name,
NamespaceName = serviceBusNamespace.Name,
QueueName = serviceBusQueue.Name,
# Using strings
Rights = new[] # => Cannot convert source type 'string[]' to target type 'Pulumi.InputList<Pulumi.Union<string,Pulumi.AzureNative.ServiceBus.AccessRights>>'
{
"Listen",
"Send"
}
# Using the struct
Rights = new[] # => Cannot convert source type 'Pulumi.AzureNative.ServiceBus.AccessRights[]' to target type 'Pulumi.InputList<Pulumi.Union<string,Pulumi.AzureNative.ServiceBus.AccessRights>>'
{
AccessRights.Listen,
AccessRights.Send
}
}
);
I ran into a similar situation in the past, where the type inheritance was a little too deep for .Net to figure out on its own (Slack thread and Github issue). While that was able to be fixed with a cast, I'm struggling to figure out how I might coerce or cast this one. As-is, I fear this resource type is unusable. Does anyone know how I might resolve this, or should I be filing an issue on Github?Rights = new InputList<Union<string, AccessRights>>
{
AccessRights.Listen
}
This works correctly. However, it's rather unintuitive, and at the least, shows the docs are in need of a correction