Notes / Projects / Platform Shipsolid / 05 Platform Configuration / Grafana Tf

Azure Key Vault Secrets — Reference

All secrets live in `mf-cc-dt-azrsrp-prd-kv`.

Updated May 1, 2026 · §202604280014-3 ·

Azure Key Vault Secrets — Reference

All secrets live in mf-cc-dt-azrsrp-prd-kv. The secret name pattern is:

grafana-<stack_slug>-<purpose>

The stack_slug is the Grafana Cloud stack identifier — shipsoliddev for the dev/staging stack or shipsolid for the prod stack.


Secrets Written by Terraform

These secrets are created or updated on every terraform apply. Do not edit them manually.

Secret name (pattern)content_typeTags descriptionSource valueUsed by
grafana-{stack}-sa-terraform-tokentext/plainGrafana sa-terraform service account token (Admin role)module.stack.sa_terraform_tokenCI/CD, any automation that calls the Grafana HTTP API as an admin
grafana-{stack}-sa-cloud-api-keytext/plainGrafana admin SA token (GRAFANA_CLOUD_API_KEY)module.stack.sa_terraform_token (same value as above, aliased for env-var consumers)Automation expecting GRAFANA_CLOUD_API_KEY; maps to ap-terraform-admin full-access policy
grafana-{stack}-alloy-writer-{env}-tokentext/plainGrafana ap-alloy-writer-{env} token — metrics:write, logs:write, traces:writemodule.stack.alloy_writer_tokens[env]Alloy DaemonSet for the matching environment — LBAC-restricted write-only token
grafana-{stack}-cloud-prom-usernametext/plainPrometheus remote-write numeric user ID (GRAFANA_CLOUD_PROM_USERNAME)module.stack.prometheus_user_idAlloy prometheus.remote_write basic-auth username
grafana-{stack}-cloud-prom-endpointtext/plainPrometheus remote-write base URL (GRAFANA_CLOUD_PROM_ENDPOINT)module.stack.prometheus_urlAlloy prometheus.remote_write endpoint
grafana-{stack}-cloud-mimir-endpointtext/plainMimir remote write URL (GRAFANA_CLOUD_MIMIR_URL)module.stack.prometheus_url (same URL as prom)Alloy What is Mimir remote-write endpoint; alias used by consumers that distinguish Mimir from raw Prometheus
grafana-{stack}-cloud-mimir-usernametext/plainMimir numeric user ID (GRAFANA_CLOUD_MIMIR_USERNAME)module.stack.prometheus_user_id (same value as prom)Alloy Mimir basic-auth username
grafana-{stack}-cloud-loki-endpointtext/plainLoki push URL (GRAFANA_CLOUD_LOKI_URL)module.stack.loki_urlAlloy loki.write endpoint
grafana-{stack}-cloud-loki-usernametext/plainLoki numeric user ID (GRAFANA_CLOUD_LOKI_USERNAME)module.stack.loki_user_idAlloy loki.write basic-auth username
grafana-{stack}-cloud-tempo-endpointtext/plainTempo ingest URL (GRAFANA_CLOUD_TEMPO_URL)module.stack.tempo_urlAlloy otelcol.exporter.otlp endpoint
grafana-{stack}-cloud-tempo-usernametext/plainTempo numeric user ID (GRAFANA_CLOUD_TEMPO_USERNAME)module.stack.tempo_user_idAlloy OTLP basic-auth username
grafana-{stack}-cloud-otlp-endpointtext/plainOTLP gateway URL (GRAFANA_CLOUD_OTLP_URL)module.stack.otlp_urlOTel collectors / Alloy unified OTLP ingestion for metrics+logs+traces
grafana-{stack}-cloud-otlp-usernametext/plainOTLP basic-auth username (GRAFANA_CLOUD_OTLP_USERNAME)module.stack.stack_id (Grafana Cloud stack numeric ID)OTLP basic-auth username paired with a CAP token as password
grafana-{stack}-faro-api-endpointtext/plainFaro REST API endpoint (stack-level — used for sourcemap uploads)Stack-level Faro API base URLCI/CD sourcemap upload scripts
grafana-{stack}-faro-sourcemap-tokentext/plainGrafana Cloud access policy token for Faro sourcemap uploadsgrafana_cloud_access_policy_token.ap_faro_sourcemap_upload_token.tokenCI/CD pipeline — authenticates sourcemap POST requests against the Faro REST API

Per-environment alloy-writer token instances

{env} expands based on var.stack_environments:

Environment (stack_slug)stack_environmentsAlloy-writer secrets created
shipsoliddev["shipsoliddev"]grafana-shipsoliddev-alloy-writer-shipsoliddev-token
shipsolid["dev", "staging", "prod"]grafana-shipsolid-alloy-writer-dev-token, grafana-shipsolid-alloy-writer-staging-token, grafana-shipsolid-alloy-writer-prod-token

Each alloy-writer token is backed by a Cloud Access Policy (ap-alloy-writer-{env}) that carries a label_policy LBAC rule. The Grafana Cloud API rejects writes where the deployment_environment label does not match the policy’s {env} value — regardless of what the Alloy pipeline configuration sends.


Secrets Pre-populated Externally (Read by Terraform)

These secrets must exist in Key Vault before running terraform apply. Terraform reads them as data sources; it does not create or overwrite them. Store an empty string "" for optional product webhooks that are not yet configured.

Secret name (pattern)Used byNotes
grafana-{stack}-azure-ad-client-secretmodule.sso and module.datasourcesAzure AD app client secret for Grafana SSO and the Azure Monitor data source
grafana-{stack}-teams-webhook-sre-criticalmodule.alertingTeams incoming webhook for SRE critical contact point
grafana-{stack}-webhook-sre-genericmodule.alertingGeneric webhook URL for SRE fallback/catch-all contact point
grafana-{stack}-teams-webhook-mdixai-nonprodmodule.alertingTeams webhook for MDIxAI non-prod alerts contact point
grafana-{stack}-teams-webhook-daia-nonprodmodule.alertingTeams webhook for AKS-DAIA non-prod alerts contact point
grafana-{stack}-teams-webhook-hwa-nonprodmodule.alertingTeams webhook for HWA non-prod alerts contact point
grafana-{stack}-teams-webhook-ieo-nonprodmodule.alertingTeams webhook for AKS-IEO non-prod alerts contact point
grafana-{stack}-teams-webhook-passport-nonprodmodule.alertingTeams webhook for Passport non-prod alerts contact point
grafana-{stack}-bigpanda-webhookmodule.alertingBigPanda webhook URL for production alert routing

Common Tags

All Terraform-managed secrets carry these tags:

TagValue
managed-byterraform
teamsre
descriptionSecret-specific (see table above)

Secret Lifecycle

CategoryHow the value is rotated
SA / alloy-writer tokensRun terraform apply — Terraform recreates the Grafana Cloud token and overwrites the KV secret. Roll-restart Alloy DaemonSets after apply so pods re-read the new value from KV.
Faro sourcemap tokenSame as above — terraform apply regenerates the ap-faro-sourcemap-{stack} policy token.
Externally managed secretsRotate directly in Key Vault (out-of-band). Terraform only reads these; terraform apply picks up the new value on the next run.

All tokens have a TTL of 90 days (token_ttl_seconds, default 7776000 s in modules/stack/variables.tf). The Faro sourcemap token uses a hardcoded 8760h (1 year) with lifecycle { ignore_changes = [expires_at] } to avoid forced replacement on each plan. The token-expiry workflow alerts 30 days before expiry.

Local graph

Full graph →