https://pulumi.com logo
#azure
Title
a

adorable-television-86106

07/28/2023, 9:06 PM
Hey all, I was hoping to get some assistance with an issue creating Azure Application Insights with a Log Analytics Workspace. I read the ticket here which offered some clarification to use a particular version of the API (v20200202). However, I still receive this error: error: autorest/azure: Service returned an error. Status=400 Code="BadRequest" Message="Cannot set LogAnalytics as IngestionMode on current api-version" InnerError={"trace":["System.ArgumentException"]}. I am wondering if I am missing something obvious? But, I am a bit at a loss for what else to try. I will add more detail in the thread.
the creation of the account is more or less this:
using Pulumi.AzureNative.Insights.V20200202; var appInsights = new Component(name, new ComponentArgs { ApplicationType = "web", Kind = "web", ResourceName = name, ResourceGroupName = context.ResourceGroupName, WorkspaceResourceId = workspaceId, });
image.png
m

melodic-tomato-39005

07/31/2023, 5:51 AM
Hi Ethan, this is weird. I double-checked the Azure API specs that the Pulumi provider is generated from, and it says that
LogAnalytics
is the default in version 20200202:
Copy code
"IngestionMode": {
          "type": "string",
          "description": "Indicates the flow of the ingestion.",
          "default": "LogAnalytics",
          "enum": [
            "ApplicationInsights",
            "ApplicationInsightsWithDiagnosticSettings",
            "LogAnalytics"
          ],
        }
That seems like an Azure issue at first glance. You could try the newest available API version V20220615, or the older version V20150501.
16 Views