fix(servicedirectory): add diff suppress for project ID/number on endpoint network field - #18584
Conversation
|
Hi there, I'm the Modular magician. I've detected the following information about your changes for commit 2efabac: Diff reportYour PR generated the following diffs in downstream repositories:
Test reportAnalytics
Affected Service Packages
Step 1: Replaying Mode Action takenFound 4 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. |
The
networkfield ongoogle_service_directory_endpointwas markedimmutable: true(ForceNew) with no diff suppression. When users specify the network using a project ID
(
projects/my-project/locations/global/networks/my-network), the GCP API returns theproject number form (
projects/123456789/locations/global/networks/my-network). Terraform'sraw string comparison detects a diff and, because the field was ForceNew, destroys and
recreates the endpoint on every plan/apply.
Details
immutable: truefrom thenetworkfield ongoogle_service_directory_endpointdiff_suppress_func: tpgresource.CompareSelfLinkRelativePathsIgnoreProjectIdto treatproject ID and project number forms as equivalent
Release Note Template for Downstream PRs (will be copied)