feat: comment serviceaccount create output

The plain text output makes it less friendly to automation and saving to
.env files because it's interpreted by the shell.

Signed-off-by: Justin Garrison <justin.garrison@siderolabs.com>
This commit is contained in:
Justin Garrison 2026-04-09 13:44:30 -07:00 committed by Oguz Kilcan
parent 967c229e1d
commit 302e9175a3
No known key found for this signature in database
GPG Key ID: 372F271E3AD80BFC

View File

@ -69,13 +69,13 @@ var (
return err
}
fmt.Printf("Created service account %q with public key ID %q\n", name, publicKeyID)
fmt.Printf("\n")
fmt.Printf("Set the following environment variables to use the service account:\n")
fmt.Fprintf(os.Stderr, "Created service account %q with public key ID %q\n", name, publicKeyID)
fmt.Fprintf(os.Stderr, "\n")
fmt.Fprintf(os.Stderr, "Set the following environment variables to use the service account:\n")
fmt.Printf("%s=%s\n", access.EndpointEnvVar, client.Endpoint())
fmt.Printf("%s=%s\n", serviceaccount.OmniServiceAccountKeyEnvVar, encodedKey)
fmt.Printf("\n")
fmt.Printf("Note: Store the service account key securely, it will not be displayed again\n")
fmt.Fprintf(os.Stderr, "\n")
fmt.Fprintf(os.Stderr, "Note: Store the service account key securely, it will not be displayed again\n")
return nil
})
@ -111,13 +111,13 @@ var (
return err
}
fmt.Printf("Renewed service account %q by adding a public key with ID %q\n", name, publicKeyID)
fmt.Printf("\n")
fmt.Printf("Set the following environment variables to use the service account:\n")
fmt.Fprintf(os.Stderr, "Renewed service account %q by adding a public key with ID %q\n", name, publicKeyID)
fmt.Fprintf(os.Stderr, "\n")
fmt.Fprintf(os.Stderr, "Set the following environment variables to use the service account:\n")
fmt.Printf("%s=%s\n", access.EndpointEnvVar, client.Endpoint())
fmt.Printf("%s=%s\n", serviceaccount.OmniServiceAccountKeyEnvVar, encodedKey)
fmt.Printf("\n")
fmt.Printf("Note: Store the service account key securely, it will not be displayed again\n")
fmt.Fprintf(os.Stderr, "\n")
fmt.Fprintf(os.Stderr, "Note: Store the service account key securely, it will not be displayed again\n")
return nil
})