scalr_grafana_integration
Resource: scalr_grafana_integration
Manages the state of Grafana integrations in Scalr. The integration sends Scalr audit logs and run events to Grafana Cloud or a self-hosted Loki over OTLP.
Example Usage
# Grafana Cloud
resource "scalr_grafana_integration" "example" {
name = "grafana-cloud"
kind = "cloud"
endpoint = "https://otlp-gateway-prod-eu-west-2.grafana.net/otlp"
auth_type = "basic"
username = "123456" # Grafana Cloud instance ID
secret = var.grafana_cloud_token
}
# Self-hosted multi-tenant Loki
resource "scalr_grafana_integration" "loki" {
name = "loki"
kind = "loki"
endpoint = "https://loki.example.com/otlp"
auth_type = "bearer"
secret = var.loki_token
tenant_id = "scalr"
}Schema
Required
auth_type(String) Authentication scheme:basicorbearer. Grafana Cloud requiresbasic.endpoint(String) Base OTLP URL, for examplehttps://otlp-gateway-prod-eu-west-2.grafana.net/otlp. Must use https and must not end with/v1/logs.kind(String) Grafana destination:cloudfor Grafana Cloud orlokifor a self-hosted Loki.name(String) Name of the Grafana integration.
Optional
secret(String, Sensitive) Basic auth password or bearer token. On Grafana Cloud, an access policy token.tenant_id(String) Loki tenant ID, sent as theX-Scope-OrgIDheader. For a multi-tenantlokionly.username(String) Basic auth username. On Grafana Cloud, the numeric instance ID.
Read-Only
account_id(String) ID of the account the integration belongs to.err_message(String) Error message reported by Scalr when the integration is in thefailedstatus.id(String) The ID of this resource.status(String) Status of the integration:active,disabledorfailed. Scalr sets thefailedstatus when the endpoint rejects the credentials during delivery.
Import
Import is supported using the following syntax:
terraform import scalr_grafana_integration.example in-xxxxxxxxxxUpdated 19 minutes ago
Did this page help you?
