Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,11 +165,11 @@ data "grafana_synthetic_monitoring_probes" "main" {

```terraform
// Step 1: Configure provider block.
// Go to the Grafana OnCall in your stack and create api token in the settings tab.It will be your oncall_access_token.
// If you are using Grafana OnCall OSS consider set oncall_url. You can get it in OnCall -> settings -> API URL.
// You may need to set oncall_url too, depending on your region or if you are using Grafana OnCall OSS. You can get it in OnCall -> settings -> API URL.
provider "grafana" {
alias = "oncall"
oncall_access_token = "my_oncall_token"
alias = "oncall"
url = "http://grafana.example.com/"
auth = var.grafana_auth
}

data "grafana_oncall_user" "alex" {
Expand Down Expand Up @@ -201,15 +201,16 @@ resource "grafana_oncall_escalation" "example_notify_step" {
}
```

Alternatively, you can also configure the provider block by setting `url`
to your Grafana URL and `auth` to a service account token:
Alternatively, you can also configure the provider block by setting
an specific `oncall_access_token` instead, that you can create in the web UI:

```terraform
// Step 1: Configure provider block.
// Go to the Grafana OnCall in your stack and create api token in the settings tab.It will be your oncall_access_token.
// If you are using Grafana OnCall OSS consider set oncall_url. You can get it in OnCall -> settings -> API URL.
provider "grafana" {
alias = "oncall"
url = "http://grafana.example.com/"
auth = var.grafana_auth
alias = "oncall"
oncall_access_token = "my_oncall_token"
}

data "grafana_oncall_user" "alex" {
Expand Down
1 change: 1 addition & 0 deletions examples/provider/provider-oncall-sa.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// Step 1: Configure provider block.
// You may need to set oncall_url too, depending on your region or if you are using Grafana OnCall OSS. You can get it in OnCall -> settings -> API URL.
provider "grafana" {
alias = "oncall"
url = "http://grafana.example.com/"
Expand Down
8 changes: 4 additions & 4 deletions templates/index.md.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ The changelog for this provider can be found here: <https://github.com/grafana/t

### Managing Grafana OnCall

{{ tffile "examples/provider/provider-oncall.tf" }}
{{ tffile "examples/provider/provider-oncall-sa.tf" }}

Alternatively, you can also configure the provider block by setting `url`
to your Grafana URL and `auth` to a service account token:
Alternatively, you can also configure the provider block by setting
an specific `oncall_access_token` instead, that you can create in the web UI:

{{ tffile "examples/provider/provider-oncall-sa.tf" }}
{{ tffile "examples/provider/provider-oncall.tf" }}

{{ .SchemaMarkdown | trimspace }}

Expand Down
Loading