From d2909b1ba4b807e764a9f7533b2b060e72ca92ef Mon Sep 17 00:00:00 2001 From: Eric Pang Date: Fri, 29 Nov 2024 04:30:46 +0000 Subject: [PATCH] Fix privateca ref --- apis/refs/v1beta1/privatecaref.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apis/refs/v1beta1/privatecaref.go b/apis/refs/v1beta1/privatecaref.go index 440cba2e89..9c880c7362 100644 --- a/apis/refs/v1beta1/privatecaref.go +++ b/apis/refs/v1beta1/privatecaref.go @@ -58,7 +58,7 @@ func ResolvePrivateCACAPoolRef(ctx context.Context, reader client.Reader, src cl // External should be in the `projects/{project_id}/locations/{region}/caPools/{caPool}` format if ref.External != "" { tokens := strings.Split(ref.External, "/") - if len(tokens) == 6 && tokens[0] == "project" && tokens[2] == "locations" && tokens[4] == "caPools" { + if len(tokens) == 6 && tokens[0] == "projects" && tokens[2] == "locations" && tokens[4] == "caPools" { ref = &PrivateCACAPoolRef{ External: fmt.Sprintf("projects/%s/locations/%s/caPools/%s", tokens[1], tokens[3], tokens[5]), }