terraform-provider-grafana
terraform-provider-grafana copied to clipboard
Provide possibility to create Grafana OnCall token trough terrafrom
Right now Terraform scripts documentation recommends to go into the page of Grafana OnCall plugin and generate token.
Please provide possibility to create this token using Terraform scripts as it done with grafana_cloud_access_policy_token
https://github.com/grafana/oncall/pull/3189 looks promising for this. It's still early (alpha as mentioned in the PR) but it sounds like it could work for TF
Hey @julienduchesne , did you get it working?
Haven't tried it out. Just keeping track of options
@julienduchesne just to clarify, the PR you linked only allows using a service account for the resolution notes?
Correct me if I'm wrong but the lack of this feature makes it not possible to create Grafana and Grafana OnCall as part of a single Terraform stack (without manual intervention)? That seems like a pretty important use case and is blocking us right now.
You are not wrong, it's not possible to use it right now. But it's also not possible to programatically create an oncall token right now. It's promising because it may be the way forward in the future, when/if it is extended to all API endpoints. I'm just keeping notes in the open
Thanks, appreciate the quick answer. So am I right to assume that I should raise this (ability to create tokens programmatically) as an issue with the OnCall team?
You may, though the service account seem like the way forward that they've decided and they're already working on it
FYI, it is now possible to manage OnCall resources authenticating the provider via a service account token.
Closing this as per comment above.