resource "grafana_api_key" "bar" {
name = "key_bar"
role = "Admin"
seconds_to_live = 30
}```
But, how can you create the key if this key is needed by the provider to start ?
You can’t. You have to provide some initial credentials external to Terraform, so Terraform is able to authenticate to Grafana to do whatever you want it to do.
thanks, makes sense I guess,
an issue is the TTL on garfana’s side, max 1 month, so key have to be rotated before executing the plan again.
If anyone has work with Grafana provider, suggestion to pass the news keys to the provider is welcome .