mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-07-31 19:18:40 -04:00
Cloud provider GCP: adopt changes to CCM / CNM for GCP
This commit is contained in:
parent
a59ce30e7b
commit
3c1ddfb94e
9 changed files with 430 additions and 60 deletions
|
@ -2,7 +2,6 @@ package gcp
|
|||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"regexp"
|
||||
"strings"
|
||||
|
@ -267,7 +266,7 @@ func splitProviderID(providerID string) (project, zone, instance string, err err
|
|||
providerIDregex := regexp.MustCompile(`^gce://([^/]+)/([^/]+)/([^/]+)$`)
|
||||
matches := providerIDregex.FindStringSubmatch(providerID)
|
||||
if len(matches) != 4 {
|
||||
return "", "", "", errors.New("error splitting providerID")
|
||||
return "", "", "", fmt.Errorf("error splitting providerID: %v", providerID)
|
||||
}
|
||||
return matches[1], matches[2], matches[3], nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue