terraform-provider-grafana icon indicating copy to clipboard operation
terraform-provider-grafana copied to clipboard

Provide possibility to create Grafana OnCall token trough terrafrom

Open Hronom opened this issue 2 years ago • 7 comments

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

Hronom avatar Aug 01 '23 18:08 Hronom

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

julienduchesne avatar Nov 29 '23 03:11 julienduchesne

Hey @julienduchesne , did you get it working?

fatihyildiz-cs avatar Dec 05 '23 17:12 fatihyildiz-cs

Haven't tried it out. Just keeping track of options

julienduchesne avatar Dec 05 '23 17:12 julienduchesne

@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.

RoopeHakulinen avatar Dec 07 '23 14:12 RoopeHakulinen

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

julienduchesne avatar Dec 07 '23 14:12 julienduchesne

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?

RoopeHakulinen avatar Dec 07 '23 14:12 RoopeHakulinen

You may, though the service account seem like the way forward that they've decided and they're already working on it

julienduchesne avatar Dec 07 '23 14:12 julienduchesne

FYI, it is now possible to manage OnCall resources authenticating the provider via a service account token.

matiasb avatar Jan 07 '25 18:01 matiasb

Closing this as per comment above.

Duologic avatar Jan 20 '25 14:01 Duologic