Skip to content

monitoring: make workloads dashboard plan idempotent#237

Open
ejahnGithub wants to merge 5 commits into
sigstore:mainfrom
ejahnGithub:ejahn/workloads-dashboard-idempotent
Open

monitoring: make workloads dashboard plan idempotent#237
ejahnGithub wants to merge 5 commits into
sigstore:mainfrom
ejahnGithub:ejahn/workloads-dashboard-idempotent

Conversation

@ejahnGithub

Copy link
Copy Markdown
Contributor

The GCP Monitoring API strips default-valued fields (xPos: 0, yPos: 0) from the dashboard JSON it returns, so every subsequent terraform plan against google_monitoring_dashboard.workloads shows a spurious + xPos = 0 / + yPos = 0 update.

Example drift from a recent staging apply: https://github.com/sigstore/public-good-instance/actions/runs/27028115518/job/79773220251

Drop the explicit zero defaults from gcp/modules/monitoring/infra/workloads.json so the rendered config matches what the API returns. No behavioral change — the resulting dashboard layout is identical.

@ejahnGithub ejahnGithub requested a review from a team as a code owner June 8, 2026 17:29
@Hayden-IO

Copy link
Copy Markdown
Contributor

Please sign the DCO

@Hayden-IO

Copy link
Copy Markdown
Contributor

Can you also add a small temporary edit to one of the terraform configs so we can verify the plan?

The GCP Monitoring API strips default-valued fields (xPos: 0, yPos: 0)
from the dashboard JSON it returns, so every subsequent terraform plan
showed a spurious 'xPos = 0' / 'yPos = 0' update against the workloads
dashboard. Drop the explicit zero defaults from the source JSON so the
rendered config matches what the API returns.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: ejahnGithub <ejahngithub@github.com>
@ejahnGithub ejahnGithub force-pushed the ejahn/workloads-dashboard-idempotent branch from 57a082f to df09feb Compare June 9, 2026 20:28
ejahnGithub and others added 4 commits June 9, 2026 16:33
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: ejahnGithub <ejahngithub@github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: ejahnGithub <ejahngithub@github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: ejahnGithub <ejahngithub@github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Signed-off-by: ejahnGithub <ejahngithub@github.com>
dashboard_json = <<EOF
{
"displayName": "Spanner CPU Alerts",
"displayName": "Spanner CPU Alerts.",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't need to change this, I think Hayden meant something else when he asked for a temporary change.

@cmurphy

cmurphy commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

@Hayden-IO we can't verify the terraform plan from this repo, that's only in public-good-instance. We may as well merge this and then update the ref in pgi to see if it works.

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