Hello, I'm getting `System.InvalidOperationExcepti...
# general
a
Hello, I'm getting `System.InvalidOperationException: Expected System.String but got System.Collections.Immutable.ImmutableArray`1[[System.Object, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]] deserializing Pulumi.Azure.AppService.AppService.appSettings` after updating to Pulumi 1.6.0
w
Cc @lemon-spoon-91807 and @tall-librarian-49374.
t
@adventurous-garage-59192 what is the version of the Pulumi.Azure package?
a
1.4.0-preview
t
Hmm, I just ran the App Service example with it and it worked. Could you share your code snippet?
a
Copy code
var appServiceName = $"...";

            var app = new AppService(appServiceName, new AppServiceArgs
            {
                //TODO replace hardcoded names with values from StackReference when supported
                Name = appServiceName,
                ResourceGroupName = "....",
                AppServicePlanId = "....",
                //TODO uncomment when terraform bug is fixed
                /*SiteConfig = new AppServiceSiteConfigArgs()
                {
                    Http2Enabled = true,
                    AlwaysOn = false
                },*/
                AppSettings =
                {
                    { "WEBSITE_RUN_FROM_PACKAGE", "1" }
                },
                ConnectionStrings =
                {
                    new AppServiceConnectionStringsArgs
                    {
                        Name = "Postgres",
                        Type = "Custom",
                        Value = "....."
                    }
                }
            }, new CustomResourceOptions {DeleteBeforeReplace = true});
It's pretty close to the app service example.
t
I'm puzzled
You don't explicitly reference
Pulumi
nuget package, do you?
a
Nope
If I get rid of the AppSettings config it works fine.
t
Okay I got it reproduced
👍 1
a
From what I can tell, this is supposed to be fixed in the latest release, but it's still occurring. Running 1.6.1 + 1.5 Azure preview.
t
It's not fixed. Track https://github.com/pulumi/pulumi-azure/issues/383 for progress.
a
I thought it was this issue: https://github.com/pulumi/examples/issues/476 🤔
t
Ah... And the error still matches that one?
a
Yup
t
You might need to add an explicit reference to the Pulumi NuGet package version 1.6.1
a
Tried that. Still throws with same exception.
This is a serious problem as it blocks adding custom configurations to app service instances.
l
Can you add your information to the bug?
a
Seems VS was causing me problems and not adding the pulumi dependency correctly, so the initial issue is indeed fixed. We're just back to ye olde stack panic now, will add my log.
Alright, repeating
pulumi up
again seems to have (finally) used the latest pulumi dependency and it passed without issue. Everything appears fixed now. Apologies for wasting your time, thanks for your work.