https://pulumi.com logo
a

adventurous-garage-59192

11/21/2019, 2:49 AM
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

white-balloon-205

11/21/2019, 3:02 AM
Cc @lemon-spoon-91807 and @tall-librarian-49374.
t

tall-librarian-49374

11/21/2019, 4:55 AM
@adventurous-garage-59192 what is the version of the Pulumi.Azure package?
a

adventurous-garage-59192

11/21/2019, 5:01 AM
1.4.0-preview
t

tall-librarian-49374

11/21/2019, 5:02 AM
Hmm, I just ran the App Service example with it and it worked. Could you share your code snippet?
a

adventurous-garage-59192

11/21/2019, 5:18 AM
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

tall-librarian-49374

11/21/2019, 5:26 AM
I'm puzzled
You don't explicitly reference
Pulumi
nuget package, do you?
a

adventurous-garage-59192

11/21/2019, 5:33 AM
Nope
If I get rid of the AppSettings config it works fine.
t

tall-librarian-49374

11/21/2019, 5:51 AM
Okay I got it reproduced
👍 1
a

adventurous-garage-59192

12/02/2019, 2:34 AM
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

tall-librarian-49374

12/02/2019, 7:38 AM
It's not fixed. Track https://github.com/pulumi/pulumi-azure/issues/383 for progress.
a

adventurous-garage-59192

12/02/2019, 7:49 AM
I thought it was this issue: https://github.com/pulumi/examples/issues/476 🤔
t

tall-librarian-49374

12/02/2019, 10:53 AM
Ah... And the error still matches that one?
a

adventurous-garage-59192

12/02/2019, 12:07 PM
Yup
t

tall-librarian-49374

12/02/2019, 12:08 PM
You might need to add an explicit reference to the Pulumi NuGet package version 1.6.1
a

adventurous-garage-59192

12/03/2019, 1:19 AM
Tried that. Still throws with same exception.
This is a serious problem as it blocks adding custom configurations to app service instances.
l

lemon-spoon-91807

12/03/2019, 2:02 AM
Can you add your information to the bug?
a

adventurous-garage-59192

12/03/2019, 2:54 AM
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.