https://pulumi.com logo
Title
s

square-eye-69977

06/01/2021, 1:39 PM
Hi - I am confused on how to express in C# an Input<object>. I used the conversion tool from ARM template for a Bot Registration and it produced the following: var channelResource = new AzureNative.BotService.V20210301.Channel("channelResource", new AzureNative.BotService.V20210301.ChannelArgs { ChannelName = $"{botServicesEICallingBotNameParam}/MsTeamsChannel", Location = "global", Properties = { { "channelName", "MsTeamsChannel" }, { "properties", { { "enableCalling", true }, { "isEnabled", true }, } }, }, ... When looking up ChannelArgs ....... // // Summary: // The set of properties specific to bot channel resource [Input("properties", false, false)] public Input<object>? Properties { get; set; } The error when hovering over the Properties is Object or collection initializer implicitly dereferences possibly null member 'ChannelArgs.Properties'. The error when running pulumi up: Invalid expression term '{' Thanks
t

tall-librarian-49374

06/01/2021, 1:43 PM
You should pass one of the typed objects that are accepted there, see examples in https://www.pulumi.com/docs/reference/pkg/azure-native/botservice/channel/
s

square-eye-69977

06/01/2021, 3:42 PM
Thanks for that. I fixed it so that it compiles.