Hey I'm having a hard time finding the ARM type `M...
# azure
t
Hey I'm having a hard time finding the ARM type
Microsoft.OperationalInsights/workspaces/providers/diagnosticSettings
in azure native. It's in the azure library at
azure.monitoring.DiagnosticSetting
This is not a huge deal, the old provider does update every
pulumi up
thanks to an inexplicable "logs" diff, and weirdness like that makes me want to purge all non-azure-native. I was able to find LogAnalytics right where it should be so it's weird to me that this one bit wouldn't exist.
t
t
That was it! Thank you
hmm I'm getting a strange error when I got to use it...
Copy code
error: autorest/azure: Service returned an error. Status=<nil> <nil>
Copy code
const azMonitoringDiagnostic = new azureNative.insights.DiagnosticSetting(name, {
  workspaceId: config.logAnalyticsWorkspaceId,
  resourceUri: config.clusterId,
  name: "mysetting",
  logs: ["kube-apiserver", "kube-controller-manager", "kube-scheduler", "kube-audit", "cluster-autoscaler"].map(
    (category) => ({
      category,
      enabled: true,
      retentionPolicy: { enabled: true, days: 0 },
    }),
  ),
  metrics: [
    {
      category: "AllMetrics",
      enabled: true,
      retentionPolicy: { enabled: true, days: 0 },
    },
  ],
});
Deleting the old one first cleared it up. Some sort of conflict on the resourceId. Leaving this up for posterity.