I'm trying to setup application insights with azur...
# azure
a
I'm trying to setup application insights with azure monitor, but I can't seem to set the right value for the workspaceId.
Copy code
AzureMonitorWorkspace workspace = new AzureMonitorWorkspace("law-smartassist-01", new AzureMonitorWorkspaceArgs
{
    ResourceGroupName = resourceGroupName,
    AzureMonitorWorkspaceName = "law-smartassist-01",
    Tags = 
    {
        { "Project", "SmartAssist" },
    }
});

Component appInsights = new Component("ai-smartassist-01", new ComponentArgs
{
    ResourceGroupName = resourceGroupName,
    WorkspaceResourceId = workspace.AccountId,
    ApplicationType = ApplicationType.Web,
    Kind = "web",
    Tags = new InputMap<string>
    {
        { "Project", "SmartAssist" }
    }
});
Never mind! I should have created
Pulumi.AzureNative.OperationalInsights.Workspace
instead of the azure monitor workspace. I feel a little silly 🤣