grafana / crossplane-provider-grafana

Crossplane provider of https://github.com/grafana/terraform-provider-grafana. Generated by https://github.com/upbound/upjet
Apache License 2.0
26 stars 14 forks source link

Grafana OnCall Schedule - Changing Team Field on UI causes the Schedule to duplicate and lose references. #175

Open MasterExecuson opened 3 weeks ago

MasterExecuson commented 3 weeks ago

Hey team!

Issue:

After creating a Schedule for Team A through IAC, if a user change on the UI the Schedule Team to Team B, the IAC effectivelly lose the reference of the resource, causing it to create a brand new Schedule.

The issue with this is that all the resources are linked through ID, so all the other componentes (integration, route, etc) will start using the modified one, so any change done to the schedule on the IAC will take no effect.

Expected Behavior:

Similar to other components (Alerts, Dashboards), I expected this to be automatically reverted back in a few moments, without any change to the Schedule ID. As we are using IAC, I expect the code to be the master for any Configuration parameter.

Current configuration:


apiVersion: oncall.grafana.crossplane.io/v1alpha1
kind: Schedule
metadata:
  finalizers:
  - finalizer.managedresource.crossplane.io
  name: my-schedule-name
spec:
  deletionPolicy: Delete
  forProvider:
    enableWebOverrides: true
    name: my-schedule-name
    shifts:
    - shiftid1
    - shiftid2
    teamId: teamid
    timeZone: America/New_York
    type: calendar
  initProvider: {}
  managementPolicies:
  - '*'
  providerConfigRef:
    name: grafana-cloud-provider-config