You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit adds the groundwork to support Frontend Observability as
code. More specificailly, the change contains
1. A Go HTTP client that consumes the Apps API (Create/Read/Update/Delete)
2. Data Source and Resource version of the Frontend Observability App
entity.
Before using the Terraform Provider to manage Grafana Frontend Observability resources, such as your apps, you need to create an access policy token on the Grafana Cloud Portal. This token is used to authenticate the provider to the Grafana Frontend Observability API.
250
+
[These docs](https://grafana.com/docs/grafana-cloud/security-and-account-management/authentication-and-permissions/access-policies/using-an-access-policy-token/#create-an-access-policy-for-a-stack) will guide you on how to create
251
+
an access policy. The required permissions, or scopes, are `frontend-observability:read`, `frontend-observability:write`, `frontend-observability:delete` and `stacks:read`.
252
+
253
+
You can also use the `cloud_access_policy_token` provided it has the aforementioned scopes included.
254
+
255
+
#### Configuring the Provider to use the Frontend Observability API
256
+
257
+
Once you have the token you can configure the provider as follows:
258
+
259
+
```hcl
260
+
provider "grafana" {
261
+
frontend_o11y_api_access_token = "<Access Token from previous step>"
-`connections_api_url` (String) A Grafana Connections API address. May alternatively be set via the `GRAFANA_CONNECTIONS_API_URL` environment variable.
258
278
-`fleet_management_auth` (String, Sensitive) A Grafana Fleet Management basic auth in the `username:password` format. May alternatively be set via the `GRAFANA_FLEET_MANAGEMENT_AUTH` environment variable.
259
279
-`fleet_management_url` (String) A Grafana Fleet Management API address. May alternatively be set via the `GRAFANA_FLEET_MANAGEMENT_URL` environment variable.
280
+
-`frontend_o11y_api_access_token` (String, Sensitive) A Grafana Frontend Observability API access token. May alternatively be set via the `GRAFANA_FRONTEND_O11Y_API_ACCESS_TOKEN` environment variable.
260
281
-`http_headers` (Map of String, Sensitive) Optional. HTTP headers mapping keys to values used for accessing the Grafana and Grafana Cloud APIs. May alternatively be set via the `GRAFANA_HTTP_HEADERS` environment variable in JSON format.
261
282
-`insecure_skip_verify` (Boolean) Skip TLS certificate verification. May alternatively be set via the `GRAFANA_INSECURE_SKIP_VERIFY` environment variable.
262
283
-`oncall_access_token` (String, Sensitive) A Grafana OnCall access token. May alternatively be set via the `GRAFANA_ONCALL_ACCESS_TOKEN` environment variable.
@@ -577,3 +598,8 @@ For guidance on creating one, see section [obtaining connections access token](#
577
598
uses basic auth to allow access to the API, where the username is the Fleet Management instance ID and the
578
599
password is the API token. You can access the instance ID and request a new Fleet Management API token on the
579
600
Connections -> Collector -> Fleet Management page, in the API tab.
601
+
602
+
### `frontend_o11y_access_token`
603
+
604
+
An access policy token created on the [Grafana Cloud Portal](https://grafana.com/docs/grafana-cloud/security-and-account-management/authentication-and-permissions/access-policies/) to manage Frontend Observability apps.
605
+
For guidance on creating one, see section [obtaining Frontend Observability access token](#obtaining-frontend-observability-access-token).
0 commit comments