https://pulumi.com logo
Title
c

cool-jewelry-33023

10/15/2020, 1:35 PM
Hi all 🙂 Any ideas why am I getting this error when trying to update AppService AppSettings? I'm adding another key-value pair. I'm using Pulumi v2.12.0 and Pulumi.Azure Nuget 3.25.0 - I'm using C#.
t

tall-librarian-49374

10/15/2020, 1:37 PM
Hey Ivan 🙂 Show me your code.
❤️ 1
Looks like https://github.com/terraform-providers/terraform-provider-azurerm/issues/4680 but should have been fixed long time ago
c

cool-jewelry-33023

10/15/2020, 1:39 PM
Hey Mikhail 🙂 Give me a sec to clean it up... it's been "in production" since April???
t

tall-librarian-49374

10/15/2020, 1:39 PM
Ah, no, it wasn’t fixed - not clear
c

cool-jewelry-33023

10/15/2020, 1:41 PM
var appServicePlanName = $"{environment}-admin-api-xyz-v2-plan";
var appServicePlan = new Plan(appServicePlanName, new PlanArgs
{
    Name = appServicePlanName,
    ResourceGroupName = resourceGroup.Name,
    Kind = "App",
    Sku = new PlanSkuArgs
    {
        Tier = "Basic",
        Size = "B2"
    }
});

var submissionApiAppName = $"{environment}-submission-api-xyz-v2";
var submissionApiApp = new AppService(submissionApiAppName, new AppServiceArgs
{
    Name = submissionApiAppName,
    ResourceGroupName = resourceGroup.Name,
    AppServicePlanId = appServicePlan.Id,
    // A system-assigned managed service identity to be used for authentication and authorization to the SQL Database and the Blob Storage
    Identity = new AppServiceIdentityArgs {Type = "SystemAssigned"},
    AppSettings =
    {
        {"APPINSIGHTS_PROFILERFEATURE_VERSION", "disabled"},
        {"APPINSIGHTS_SNAPSHOTFEATURE_VERSION", "disabled"},
        {"DiagnosticServices_EXTENSION_VERSION", "disabled"},
        {"InstrumentationEngine_EXTENSION_VERSION", "disabled"},
        {"SnapshotDebugger_EXTENSION_VERSION", "disabled"},
        {"WEBSITE_RUN_FROM_PACKAGE", "1"},
        {"XDT_MicrosoftApplicationInsights_BaseExtensions", "disabled"},
        {"XDT_MicrosoftApplicationInsights_Mode", "default"},
        {"ApplicationInsightsAgent_EXTENSION_VERSION", "~2"},
        {"ApplicationInsights:InstrumentationKey", appInsights.InstrumentationKey},
        {"APPINSIGHTS_INSTRUMENTATIONKEY", appInsights.InstrumentationKey},
        {"PostProcessSubmissionQueueName", postProcessSubmissionQueueName},
        {"BreadcrumbsQueueName", breadcrumbsQueueName},
        {"ConversationsInboundQueueName", conversationsInboundMessageNotificationsQueueName}
    },
    ConnectionStrings =
    {
        new AppServiceConnectionStringArgs()
        {
            Name = "MainStorageAccount",
            Value = mainStorageAccount.PrimaryConnectionString,
            Type = "Custom"
        },
        new AppServiceConnectionStringArgs()
        {
            Name = "SubmissionsStorageAccount",
            Value = submissionsStorageAccount.PrimaryConnectionString,
            Type = "Custom"
        },
        new AppServiceConnectionStringArgs()
        {
            Name = "xyzDatabase",
            Value = xyzMainDatabaseConnectionString,
            Type = "SQLAzure"
        },
        new AppServiceConnectionStringArgs()
        {
            Name = "ServiceBus",
            Value = serviceBusNamespace.DefaultPrimaryConnectionString,
            Type = "Custom"
        }
    },
    ClientAffinityEnabled = false,
    ClientCertEnabled = false,
    SiteConfig = new AppServiceSiteConfigArgs()
    {
        AlwaysOn = true,
        WebsocketsEnabled = false,
        Cors = new AppServiceSiteConfigCorsArgs()
            {SupportCredentials = false, AllowedOrigins = new InputList<string>() {"*"}}
    }
});
It's a Windows AppService, and I just remembered that the other day we were "playing" with the AppService Plan SKU through the Portal, but it's back at what's specified in code
t

tall-librarian-49374

10/15/2020, 1:53 PM
Yeah, nothing odd in the code. And the error is about
expandAppServiceLogs
. Try
pulumi refresh
?
c

cool-jewelry-33023

10/15/2020, 3:50 PM
m8, you're a genius ❤️ it turns out
pulumi up
was actually making the requested change and then failing... after running
pulumi refresh
it obviously figured out something, so no updates were needed ❤️ thank you ❤️ ❤️ ❤️
interesting... I've tried changing the AppSetting name, and although it did change it - I got the same error in Powershell 😢
pulumi refresh
fetched the changed again 🙂
t

tall-librarian-49374

10/15/2020, 6:27 PM
that sounds worrying. I’m surprised I don’t see issues in the TF repo
👀 1