Skip to content

Commit

Permalink
fix: print extra steps when sa is created
Browse files Browse the repository at this point in the history
  • Loading branch information
wtrocki committed Oct 27, 2021
1 parent ea9a231 commit 536bcd9
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
5 changes: 4 additions & 1 deletion pkg/cmd/serviceaccount/create/create.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,10 @@ func runCreate(opts *options) error {
return fmt.Errorf("%v: %w", opts.localizer.MustLocalize("serviceAccount.common.error.couldNotSaveCredentialsFile"), err)
}

opts.Logger.Info(icon.SuccessPrefix(), opts.localizer.MustLocalize("serviceAccount.common.log.info.credentialsSaved", localize.NewEntry("FilePath", color.CodeSnippet(opts.filename))))
opts.Logger.Info(icon.SuccessPrefix(), opts.localizer.MustLocalize("serviceAccount.common.log.info.credentialsSaved",
localize.NewEntry("FilePath", color.CodeSnippet(opts.filename))),
localize.NewEntry("ClientID", color.Success(creds.ClientID)),
)

return nil
}
Expand Down
13 changes: 12 additions & 1 deletion pkg/localize/locales/en/cmd/serviceaccount.en.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,18 @@ other = 'you are forbidden to {{.Operation}} these service accounts'

[serviceAccount.common.log.info.credentialsSaved]
description = 'Credentials file saved message'
one = 'Credentials saved to {{.FilePath}}'
one = '''Credentials saved to {{.FilePath}}
Next step is to enable specific access rules for your current services.
To enable full access to produce consume Kafka messages execute:
$ rhoas kafka acl grant-access --producer --consumer --service-account {{.ClientID}} --topic all --group all
To enable read and write access to Service Registry
$ rhoas service-registry role add --role DEVELOPER --service-account {{.ClientID}}
'''

[serviceAccount.common.input.credentialsFileLocation.message]
description = 'Input message for credentials file location'
Expand Down

0 comments on commit 536bcd9

Please sign in to comment.