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

Organization - observe failed 403 #61

Closed ampc closed 5 months ago

ampc commented 7 months ago

I'm facing the current issue:

  1. Create a new Organization
  2. Org created with success on Grafana
  3. Restart Grafana Pod
  4. Organization is deleted
  5. Crossplane tries to reconcile and returns this error: image

Organization:

apiVersion: oss.grafana.crossplane.io/v1alpha1
kind: Organization
metadata:
  name: grafana-org
spec:
  providerConfigRef:
    name: grafana-provider-config
  forProvider:
    name: "Example Crossplane Orgbatatas"
    adminUser: admin
    createUsers: false
    admins:
      - antonio.carvalho@example.com

Sometimes I also get this error:

lastTransitionTime: "2024-01-22T17:47:02Z"
    message: 'observe failed: cannot run plan: plan failed: Instance cannot be destroyed:
      Resource grafana_organization.grafana-org has lifecycle.prevent_destroy set,
      but the plan calls for this resource to be destroyed. To avoid this error and
      continue with the plan, either disable lifecycle.prevent_destroy or reduce the
      scope of the plan using the -target flag.'

version:v0.9.0

davidgiga1993 commented 7 months ago

Got exactly the same error message (has lifecycle.prevent_destroy set) when trying to recreate or update an existing org. This also prevents updating any other organizations, effectively blocking the entire provider.

julienduchesne commented 5 months ago

This should work now with the latest version!