Hi, I`m using azure-nextgen to try to create an ap...
# azure
e
Hi, I`m using azure-nextgen to try to create an app service plan and a metric alert,
Copy code
const plan = new web.AppServicePlan("plan", {
    resourceGroupName: resourceGroup.name,
    name: "linux-asp",
    location: resourceGroup.location,
    kind: "Linux",
    sku: selectedSku,
});

const cpuAlert = new insights.MetricAlert(
    "cpuAlertName",
    {
        actions: [],
        autoMitigate: false,
        criteria: cpuCriteria,
        description: "description",
        enabled: true,
        evaluationFrequency: "Pt1m",
        location: "global",
        resourceGroupName: resourceGroup.name,
        ruleName: "cpuAlertName",
        scopes: [plan.id],
        severity: 3,
        tags: {},
        windowSize: "Pt15m",
    },
    { dependsOn: plan },
);
if I try to create them together I get the error on the preview:
panic: fatal: A failure has occurred: Unrecognized structpb value kind in RPC[Provider[azure-nextgen, 0xc00052d7a0]
but if create the app service plan first then add the metric alert it works. Does anyone have any ideas on how to create them together?
t
That sounds like a bug. Could you open an issue and I’ll take a look.