Skip to content

Commit

Permalink
OCM-6142 | Display AWS Billing Account on non-HCP
Browse files Browse the repository at this point in the history
Billing accounts can now be set on ROSA Classic clusters (rather than
just HCP clusters) and should be included in `rosa describe cluster`
accordingly.

Signed-off-by: Daniel Thau <dthau@redhat.com>
  • Loading branch information
paradigm committed Apr 2, 2024
1 parent f107b6f commit 13f3534
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/describe/cluster/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ func run(cmd *cobra.Command, argv []string) {
cluster.Version().ChannelGroup(),
clusterDNS,
creatorARN.AccountID,
BillingAccount(cluster, isHypershift),
BillingAccount(cluster),
cluster.API().URL(),
cluster.Console().URL(),
cluster.Region().ID(),
Expand Down Expand Up @@ -733,8 +733,8 @@ func formatClusterHypershift(cluster *cmv1.Cluster,
return ret, nil
}

func BillingAccount(cluster *cmv1.Cluster, isHostedControlPlane bool) string {
if !isHostedControlPlane || cluster.AWS().BillingAccountID() == "" {
func BillingAccount(cluster *cmv1.Cluster) string {
if cluster.AWS().BillingAccountID() == "" {
return ""
}
return fmt.Sprintf("AWS Billing Account: %s\n", cluster.AWS().BillingAccountID())
Expand Down

0 comments on commit 13f3534

Please sign in to comment.