tgc-revival: Refactor FindIdentityParams to use multi-segment logical AND matching#16762
tgc-revival: Refactor FindIdentityParams to use multi-segment logical AND matching#16762zli82016 wants to merge 5 commits intoGoogleCloudPlatform:mainfrom
Conversation
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
|
/gcbrun |
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
|
Hi there, I'm the Modular magician. I've detected the following information about your changes: Diff reportYour PR generated some diffs in downstreams - here they are.
|
Previously, the
FindIdentityParamsfunction within the TGC generator attempted to identify a single uniquely distinguishing URL path segment (IdentityParam) to differentiate between Terraform resources that share the exact same CAI asset type.However, this naive approach fails on complex resource groupings like
compute.googleapis.com/FirewallPolicy, where resources likeNetworkFirewallPolicyandRegionNetworkFirewallPolicyshare parameters globally and regionally, meaning they require a combination of path segments (e.g., "projects" AND "global") to be reliably identified.This PR completely refactors the identity parsing logic to aggressively group all identifying segments together rather than isolating just one.
Release Note Template for Downstream PRs (will be copied)
See Write release notes for guidance.