- Add required retention_days to cockpit_source (31 = free tier) - Remove deprecated scaleway_cockpit data source (endpoints null) - Use grafana_user resource for grafana_url output instead Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
29 lines
788 B
HCL
29 lines
788 B
HCL
# Custom metrics data source for K8s data plane
|
|
# retention_days: 31 = free tier (Scaleway data), higher = paid
|
|
resource "scaleway_cockpit_source" "k8s_metrics" {
|
|
project_id = var.project_id
|
|
name = "kapsule-data-plane"
|
|
type = "metrics"
|
|
retention_days = var.metrics_retention_days
|
|
}
|
|
|
|
# Push token for Grafana Alloy + Prometheus remote_write
|
|
resource "scaleway_cockpit_token" "k8s_push" {
|
|
project_id = var.project_id
|
|
name = "kapsule-push-token"
|
|
|
|
scopes {
|
|
query_metrics = true
|
|
write_metrics = true
|
|
query_logs = true
|
|
write_logs = true
|
|
}
|
|
}
|
|
|
|
# Grafana user for dashboard access
|
|
resource "scaleway_cockpit_grafana_user" "admin" {
|
|
project_id = var.project_id
|
|
login = var.grafana_login
|
|
role = var.grafana_role
|
|
}
|