Skip to content

Commit

Permalink
Merge pull request #253 from GoogleCloudPlatform/issue252
Browse files Browse the repository at this point in the history
FIX - Create connector regex check
  • Loading branch information
srinandan authored May 24, 2024
2 parents a58619c + 93df4e6 commit aa937cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/cmd/endpoints/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ var CreateCmd = &cobra.Command{
re := regexp.MustCompile(`projects\/([a-zA-Z0-9_-]+)\/regions` +
`\/([a-zA-Z0-9_-]+)\/serviceAttachments\/([a-zA-Z0-9_-]+)`)

if ok := re.Match([]byte(name)); !ok {
return fmt.Errorf("the service atachment does not match the required format")
if ok := re.Match([]byte(serviceAttachment)); !ok {
return fmt.Errorf("The service attachment does not match the required format")
}

_, err = connections.CreateEndpoint(name, serviceAttachment, description, wait)
Expand Down

0 comments on commit aa937cc

Please sign in to comment.