Skip to content

Commit d8f1feb

Browse files
committed
Revert "Merge pull request #1697 from onjen/fix-1142"
This reverts commit 37fe172, reversing changes made to bf5e7ae. Signed-off-by: Felix Fontein <felix@fontein.de>
1 parent 226e7f9 commit d8f1feb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

gcpkms/keysource.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,14 +280,13 @@ func (key *MasterKey) TypeToIdentifier() string {
280280
// It returns an error if the ResourceID is invalid, or if the setup of the
281281
// client fails.
282282
func (key *MasterKey) newKMSClient(ctx context.Context) (*kms.KeyManagementClient, error) {
283-
re := regexp.MustCompile(`^projects/(?P<project>[^/]+)/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$`)
283+
re := regexp.MustCompile(`^projects/[^/]+/locations/[^/]+/keyRings/[^/]+/cryptoKeys/[^/]+$`)
284284
matches := re.FindStringSubmatch(key.ResourceID)
285285
if matches == nil {
286286
return nil, fmt.Errorf("no valid resource ID found in %q", key.ResourceID)
287287
}
288288

289289
var opts []option.ClientOption
290-
opts = append(opts, option.WithQuotaProject(matches[1]))
291290
switch {
292291
case key.tokenSource != nil:
293292
opts = append(opts, option.WithTokenSource(key.tokenSource))

0 commit comments

Comments
 (0)