@@ -21,7 +21,8 @@ import (
2121)
2222
2323const (
24- instanceIdArg = "INSTANCE_ID"
24+ instanceIdArg = "INSTANCE_ID"
25+ // Deprecated: showPasswordFlag is deprecated and will be removed on 2026-07-05.
2526 showPasswordFlag = "show-password"
2627)
2728
@@ -86,6 +87,7 @@ func NewCmd(params *types.CmdParams) *cobra.Command {
8687
8788func configureFlags (cmd * cobra.Command ) {
8889 cmd .Flags ().BoolP (showPasswordFlag , "s" , false , "Show password in output" )
90+ cobra .CheckErr (cmd .Flags ().MarkDeprecated (showPasswordFlag , "This flag is deprecated and will be removed on 2026-07-05." ))
8991}
9092
9193func parseInput (p * print.Printer , cmd * cobra.Command , inputArgs []string ) (* inputModel , error ) {
@@ -122,8 +124,10 @@ func outputResult(p *print.Printer, outputFormat string, showPassword bool, graf
122124 } else if grafanaConfigs == nil {
123125 return fmt .Errorf ("grafanaConfigs is nil" )
124126 }
127+ p .Warn ("GrafanaAdminPassword and GrafanaAdminUser are deprecated and will be removed on 2026-07-05." )
125128
126129 return p .OutputResult (outputFormat , grafanaConfigs , func () error {
130+ //nolint:staticcheck // field is deprecated but still supported until 2026-07-05
127131 initialAdminPassword := utils .PtrString (instance .Instance .GrafanaAdminPassword )
128132 if ! showPassword {
129133 initialAdminPassword = "<hidden>"
@@ -136,6 +140,7 @@ func outputResult(p *print.Printer, outputFormat string, showPassword bool, graf
136140 table .AddSeparator ()
137141 table .AddRow ("SINGLE SIGN-ON" , utils .PtrString (grafanaConfigs .UseStackitSso ))
138142 table .AddSeparator ()
143+ //nolint:staticcheck // field is deprecated but still supported until 2026-07-05
139144 table .AddRow ("INITIAL ADMIN USER (DEFAULT)" , utils .PtrString (instance .Instance .GrafanaAdminUser ))
140145 table .AddSeparator ()
141146 table .AddRow ("INITIAL ADMIN PASSWORD (DEFAULT)" , initialAdminPassword )
0 commit comments