Skip to content

feat: replicate push-server dashboards on Grafana Cloud - #384

Merged
arminx86-77616c merged 7 commits into
mainfrom
feat/grafana-cloud-migration
Sep 9, 2026
Merged

arminx86-77616c merged 7 commits into
mainfrom
feat/grafana-cloud-migration

Conversation

@arminx86-77616c

Copy link
Copy Markdown
Contributor

Grafana Cloud migration - push-server (dashboards-only, dual-run) + provider bump

Twins push-server's monitoring onto Grafana Cloud alongside AMG (approach A: second aliased grafana.cloud provider, same module/workspace). push-server is DASHBOARDS-ONLY (0 alert rules) so this is the simplest unit and needs NO later route-flip PR.

What this does

  • Bumps grafana provider 2.19.0 → 4.45.2 (~> 2.0 → >= 3.0, < 5.0). Changelog audited: no 3.0.0/4.0.0 breaking change touches push-server's usage clean bump, no-op on AMG.
  • Adds an aliased grafana.cloud provider + grafana_cloud_url/grafana_cloud_token vars.
  • Creates a dedicated Cloud IAM role per stage (push-<env>-grafana-cloudwatch) with CloudWatch + aps:Query* (push has an AMP datasource), trust 008923505280:root + ExternalId 1464025. New role survives AMG teardown.
  • Adds Grafana Cloud twins, byte-identical to their AMG siblings, in the same file under a GRAFANA CLOUD TWINS banner:
    • 4 datasources (uid-preserved): 2 AMP (prometheus) + 2 CloudWatch
    • 2 dashboards (Push Server prod/staging)
    • No folder, no rule group (dashboards-only).

Counts

4 datasources · 2 dashboards · 0 alert rules.

Provider-bump verdict

Clean / no-op on existing AMG resources (validate passes; only the 4 core resource types, all stable 2.x→4.x). Also aligned the module's aws pin to the repo's ~> 4.31.

Apply target

TFC workspaces echo-server-prod and echo-server-staging (org wallet-connect, backend prefix echo-server- push-server was formerly echo-server; the push-server-* workspaces are dormant 2023 leftovers and are NOT used). Set the sensitive grafana_cloud_token in both.

Dual-run behavior

The Cloud twin dashboards render off the Cloud datasources; AMG dashboards stay live. There are no alerts, so nothing pages from either side. No routed_services, no incident route.

Review guardrail

Plan shows ONLY additive grafana.cloud-aliased resources (2 datasources + 1 dashboard per env) + the new IAM role, with the provider bump a no-es. Zero incident_* / central / infra-monitoring-grafana changes.

Rollback

Revert the branch. Nothing paged, nothing flipped

Signed-off-by: Armin Teimouri <armin@walletconnect.com>
Signed-off-by: Armin Teimouri <armin@walletconnect.com>
Max and others added 2 commits September 9, 2026 18:27
`aws/grafana/get-details` looks up a workspace tagged `Env=prod` with
push-server's own AWS credentials. Since #359 moved dashboards to Grafana
Central the workspace lives in the Monitoring account, so `list-workspaces`
returns nothing, `workspace-id` is empty and `create-workspace-api-key`
fails with "Missing required request parameters: [workspaceId]" (exit 254).
`Delete Grafana key` then fails on the empty key name (exit 252). The job
has died there since March 2025 — unnoticed because ci_terraform only runs
on `terraform/**` changes.

The key was never reaching the plan anyway: `echo-server-*` are remote
execution, and TFC remote runs read variables from the workspace, not from
runner-side `TF_VAR_*`. `TF_VAR_grafana_endpoint` has also been dead since
#359 deleted `variable "grafana_endpoint"` — the provider now takes its URL
from the monitoring remote state.

`grafana_auth` and `grafana_cloud_token` are set as sensitive variables on
`echo-server-prod`/`echo-server-staging`.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Same breakage as ci_terraform in both deploy-infra jobs, still pinned at
@1.0.3. Variables come from the TFC workspace on remote execution.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
`terraform/plan@2.5.4` runs `plan -out=/tmp/plan.tfplan`, which the remote
backend rejects: "Saving a generated plan is currently not supported". The
AMG key failure was masking this second breakage. Plan inline with tee, as
WalletConnect/ci_workflows/.github/workflows/ci-plan-infra.yml does.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Max and others added 2 commits September 9, 2026 18:43
The plan now reaches variable evaluation and fails on jwt_secret and
relay_public_key: they are not set on echo-server-staging, and TFC remote
runs ignore runner-side TF_VAR_*. grafana_auth and grafana_cloud_token ARE
set on the workspace (no error for either), so only these two need injecting.

Written as *.auto.tfvars.json, which is uploaded with the configuration and
read by the remote run — the ci_workflows tf-vars pattern. Both variables are
sensitive = true, so they stay redacted in plan output.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
get-version failed with "API rate limit exceeded" (403) on two different
runner IPs: pozetroninc/github-action-get-latest-release@master queries the
API unauthenticated, sharing a per-IP quota with every other runner on the
host. plan-staging is gated on it via needs, so the whole run went red.
Replaced with gh release view under GITHUB_TOKEN, which is what the existing
TODO on that step asked for.

Also drops actions/github-script@v6 (Node 20 warning) and the `sed 's/v//g'`
version cleanup, which stripped every "v" in the tag rather than a leading
one.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@arminx86-77616c
arminx86-77616c merged commit 9815c62 into main Sep 9, 2026
6 checks passed
@arminx86-77616c
arminx86-77616c deleted the feat/grafana-cloud-migration branch September 9, 2026 17:16

This branch was previously deployed

1 inactive deployment
staging — 7d4aadb1 Deployed Sep 9, 2026 by geekbrother via plan-staging #266
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants