cloudrunv2: fix perpetual diff in templates.container.resources.limits block#18399
cloudrunv2: fix perpetual diff in templates.container.resources.limits block#18399BBBmau wants to merge 2 commits into
cloudrunv2: fix perpetual diff in templates.container.resources.limits block#18399Conversation
cloudrunv2: fix perpetual diff when only memory is set in container resources.limitscloudrunv2: fix perpetual diff in templates.container.resources.limits block
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 3e17452: Diff reportYour PR generated the following diffs in downstream repositories:
Test reportAnalytics
Affected Service Packages
Step 1: Replaying Mode Action takenFound 3 affected test(s) by replaying old test recordings. Starting RECORDING based on the most recent commit. Click here to see the affected tests
View the replaying VCR build log Step 2: Recording Mode
Caution Issues requiring attention before PR completion 🔴 Initial Recording Failed: Some tests failed during the recording step. See the table above for details. Please address these issues to complete your PR. If you believe these detections are incorrect or unrelated to your change, please raise the concern with your reviewer. View the recording VCR build log or the debug logs folder for detailed results. @BBBmau, @zhengruan VCR tests complete for 3e17452! |
Release Note Template for Downstream PRs (will be copied)
When a google_cloud_run_v2_service container sets only memory in resources.limits, the Cloud Run v2 API automatically populates a default cpu value server-side. On subsequent plans, Terraform sees cpu in state but not in config and proposes to remove it — a perpetual diff with no way for the user to resolve it.
The fix adds a DiffSuppressFunc on the limits field that silently accepts any key the API added but the user did not configure. A regression test deploys a service with memory-only limits, imports it, then asserts the second plan produces no diff.
Fixes: hashicorp/terraform-provider-google#20399
See Write release notes for guidance.