crossplane-contrib / provider-upjet-azure

Azure Provider for Crossplane.
https://marketplace.upbound.io/providers/upbound/provider-family-azure/
Apache License 2.0
63 stars 76 forks source link

[Bug]: MonitorDiagnosticSetting API not able to set up diagnostic settings for virtual machines in Azure #845

Open rajendra-singh-negi opened 1 month ago

rajendra-singh-negi commented 1 month ago

Is there an existing issue for this?

Affected Resource(s)

apiVersion: insights.azure.upbound.io/v1beta1 kind: MonitorDiagnosticSetting

Virtual machines for windows and Linux

Resource MRs required to reproduce the bug

apiVersion: insights.azure.upbound.io/v1beta1 kind: MonitorDiagnosticSetting metadata: name: 'insights-vm-dev' labels: stage: 'dev' spec: forProvider:

enabledLog:

#   - category: WindowsEventLog
#     retentionPolicy:
#       - enabled: true
metric:
  - category: AllMetrics
    retentionPolicy:
      - enabled: true
name: 'insights-vm-dev'
storageAccountId: /subscriptions/***/resourceGroups/rg-stage-sbox/providers/Microsoft.Storage/storageAccounts/sadiagnosticeusbox
targetResourceId: /subscriptions/***/resourceGroups/rg-env-st-sbox1/providers/Microsoft.Compute/virtualMachines/vmniklustsbox1

providerConfigRef: name: azure-nonprod

Steps to Reproduce

In the activity log, it shows creating or updating resource diagnostic settings. Snapshot below

image

But when you go to virtual machine - Diagnostic settings it is empty. Snapshot below

image

What happened?

We are able to use Diagnostic settings for k8s, Redis cache and Service Bus in azure but face problems while enabling virtual machines.

Relevant Error Output Snippet

No response

Crossplane Version

1.17.1

Provider Version

v1.4.0

Kubernetes Version

No response

Kubernetes Distribution

No response

Additional Info

No response