Closed luebken closed 1 year ago
Check out the examples folder. There’s two providers required to do this because it works with two different APIs (cloud API + the instance’s API)
Thanks. I've missed 4.grafana-provider.yaml.
So it's secret seems to be created through 3.api-key-from-stack.yaml which in return needs 2.stack.yaml.
Unfortunatly, I can't create this stack:
apiVersion: cloud.grafana.crossplane.io/v1alpha1
kind: Stack
metadata:
name: my-stack
spec:
forProvider:
slug: 'luebken'
name: 'luebken'
regionSlug: "us"
providerConfigRef:
name: grafana-cloud-provider
kubectl get stacks
NAME READY SYNCED EXTERNAL-NAME AGE
my-stack False True 3m58s
kubectl describe stacks my-stack
...
Last Transition Time: 2023-03-11T14:48:05Z
Message: apply failed: status: 401, body: {
"code": "InvalidCredentials",
"message": "Token invalid",
"requestId": "70a09e9c-012e-4e4a-b7b0-2f98a9042612"
}:
Reason: ApplyFailure
Status: False
Type: LastAsyncOperation
Note that I'm using the same token as with the curl
command mentioned above.
Still working on this. I've now created a key at https://grafana.com/orgs/luebken/api-keys
instead of https://luebken.grafana.net/org/apikeys
. Now I'm running into "Hosted instance limit reached":
kubectl describe stacks.cloud.grafana.crossplane.io
...
Status:
At Provider:
Conditions:
...
Last Transition Time: 2023-03-18T08:03:52Z
Message: apply failed: status: 403, body: {
"code": "Forbidden",
"message": "Hosted instance limit reached",
"requestId": "1353fb29-c58e-4446-8630-001bcf93af88"
}:
Next step. I've created a Grafana Pro account now I get an That url is not available
error:
kubectl describe stacks.cloud.grafana.crossplane.io
...
Status:
At Provider:
Conditions:
...
Last Transition Time: 2023-03-18T08:20:05Z
Message: apply failed: status: 409, body: {
"code": "Conflict",
"message": "That url is not available",
"requestId": "45bcefc6-f2d8-4ab5-a536-ef61eb6fd675"
}:
}:
I got it running. The last error is because I've tried to create a stack with the same name.
Awesome, sorry for the lack of help here 😬 . I had to focus on something else last week unfortunately
Hey folks
I'm getting started with the Grafana Crossplane provider and I am testing it against Grafana Cloud. I was able to create a dashboard with the HTTP API. But when I try to replicate it with Crossplane I get the following error
apply failed: the Grafana client is required for grafana_dashboard. Set the auth and url provider attributes:
Most likely, I've configured something wrong. Any pointers would be appreciated.
Working example with curl
Created API key at https://luebken.grafana.net/org/apikeys
Broken example with Crossplane