Skip to content

Commit

Permalink
making GCP service account file mandatory for CCS clusters (#565)
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianoveiga committed Oct 9, 2023
1 parent eecf5d4 commit 557a66b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions cmd/ocm/create/cluster/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -1179,11 +1179,12 @@ func promptCCS(fs *pflag.FlagSet, presetCCS bool) error {
return err
}

if args.gcpServiceAccountFile != "" {
err = constructGCPCredentials(args.gcpServiceAccountFile, &args.ccs)
if err != nil {
return err
}
if args.gcpServiceAccountFile == "" {
return fmt.Errorf("A GCP service account file must be specified for CCS clusters")
}
err = constructGCPCredentials(args.gcpServiceAccountFile, &args.ccs)
if err != nil {
return err
}
}
}
Expand Down

0 comments on commit 557a66b

Please sign in to comment.