monitoring: make workloads dashboard plan idempotent#237
Open
ejahnGithub wants to merge 5 commits into
Open
Conversation
Contributor
|
Please sign the DCO |
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>
57a082f to
df09feb
Compare
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>
cmurphy
reviewed
Jun 9, 2026
| dashboard_json = <<EOF | ||
| { | ||
| "displayName": "Spanner CPU Alerts", | ||
| "displayName": "Spanner CPU Alerts.", |
Contributor
There was a problem hiding this comment.
You don't need to change this, I think Hayden meant something else when he asked for a temporary change.
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The GCP Monitoring API strips default-valued fields (
xPos: 0,yPos: 0) from the dashboard JSON it returns, so every subsequentterraform planagainstgoogle_monitoring_dashboard.workloadsshows a spurious+ xPos = 0/+ yPos = 0update.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.jsonso the rendered config matches what the API returns. No behavioral change — the resulting dashboard layout is identical.