Skip to content

Commit 8b21b80

Browse files
authored
fix(gcp): Add Location to client ID when present (#6807)
#### Summary Follow up to #6786. We should add the location to the client ID as it has to be unique <!--
1 parent 7aefc2b commit 8b21b80

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

plugins/source/gcp/client/client.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,10 @@ func (c *Client) ID() string {
8888
if c.OrgId != "" {
8989
return "org:" + c.OrgId
9090
}
91-
return c.ProjectId
91+
if c.Location != "" {
92+
return "project:" + c.ProjectId + ":location:" + c.Location
93+
}
94+
return "project:" + c.ProjectId
9295
}
9396

9497
func (c *Client) Logger() *zerolog.Logger {

0 commit comments

Comments
 (0)