> I am trying to create a VirtualMachineExtensi...
# general
b
I am trying to create a VirtualMachineExtension using pulumi using C# but the type for settings and protectedSettings are Input<object>. I tried many things but I couldn’t make it work. Does anyone have any example on how to do this?
https://www.pulumi.com/registry/packages/azure-native/api-docs/compute/virtualmachineextension/#inputs
m
Do you have some code you can share that shows how you’re declaring the
VirtualMachineExtension
instance? And anything useful you might be seeing in an error message?
f
@miniature-musician-31262 I have shared the code I am using as well as the error message I am getting
m
Thanks. I’m definitely no Azure expert, but it looks like you’re passing a (JSON-serialized)
ProtectedSettings
where a
Settings
is expected — but the properties look okay (at least from my reading of the schema), so I’m guessing that’s maybe not it. Might want to try lining those up a bit better, though, just to rule it out as a possible cause. https://docs.microsoft.com/en-us/azure/virtual-machines/extensions/custom-script-windows#troubleshoot-and-support
t
Try
new Dictionary<string, object> { ... }
f
@tall-librarian-49374 I found this example using Dictionary https://github.com/Azure/azure-libraries-for-net/issues/119 but with azure-native it is not accepting Dictionary. The type in Pulumi.Azure was Input<string> but now in Pulumi.AzureNative is Input<object> and doesn't accept Dictionary as input
t
doesn’t accept Dictionary as input
Is it a compilation or a runtime error?
f
Compilation