Skip to content

Commit 88c694c

Browse files
Merge pull request #648 from apigee/issue647
bug: #647 fixed validation of service-attachment flag
2 parents 5d74f84 + 2473630 commit 88c694c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/cmd/eptattachment/crteptattachment.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ var CreateCmd = &cobra.Command{
4040

4141
re := regexp.MustCompile(`projects\/([a-zA-Z0-9_-]+)\/regions` +
4242
`\/([a-zA-Z0-9_-]+)\/serviceAttachments\/([a-zA-Z0-9_-]+)`)
43-
ok := re.Match([]byte(location))
43+
ok := re.Match([]byte(serviceAttachment))
4444
if !ok {
45-
return fmt.Errorf("disk encryption key must be of the format " +
45+
return fmt.Errorf("serviceAttachment must be of the format " +
4646
"projects/{project-id}/regions/{location}/serviceAttachments/{sa-name}")
4747
}
4848
respBody, err := eptattachment.Create(name, serviceAttachment, location)

0 commit comments

Comments
 (0)