Skip to content

Commit

Permalink
feat: add generated cluster name to cluster creation output
Browse files Browse the repository at this point in the history
  • Loading branch information
Callum0x50 committed Jan 12, 2025
1 parent 23d103a commit 4fe5218
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/commands/cluster/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@ func NewCreateCommand(set clientset.ClientSet) *cobra.Command {
// inputs validated, assume correct usage
cmd.SilenceUsage = true

clusterName := options.Name + "-" + generateSuffix()
_, err = set.PlatformClient.CreateCluster(ctx, client.NewClusterRequest{
Name: options.Name + "-" + generateSuffix(),
Name: clusterName,
NodePools: []client.NodePool{
{
Preset: options.Preset,
Expand All @@ -81,7 +82,7 @@ func NewCreateCommand(set clientset.ClientSet) *cobra.Command {
return redact.Errorf("could not create cluster: %w", redact.Safe(err))
}

ux.Fsuccess(cmd.OutOrStdout(), "cluster created\n")
ux.Fsuccess(cmd.OutOrStdout(), "created cluster: %s\n", clusterName)

return nil
},
Expand Down

0 comments on commit 4fe5218

Please sign in to comment.