Skip to content

Commit 03f4de7

Browse files
committed
update user prompt to include key ID data
1 parent bcabe72 commit 03f4de7

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

internal/command/init_run.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,6 +429,13 @@ func (c *InitCommand) promptStateStorageProviderApproval(stateStorageProvider ad
429429
hashList.WriteString(fmt.Sprintf("- %s\n", hash))
430430
}
431431

432+
var authentication string
433+
if authResult != nil && authResult.KeyID != "" {
434+
authentication = fmt.Sprintf("%s, key ID %s", authResult.String(), authResult.KeyID)
435+
} else {
436+
authentication = authResult.String()
437+
}
438+
432439
v, err := c.UIInput().Input(context.Background(), &terraform.InputOpts{
433440
Id: "approve",
434441
Query: fmt.Sprintf(`Do you want to use provider %q (%s), version %s, for managing state?
@@ -441,7 +448,7 @@ Hashes:
441448
lock.Provider(),
442449
lock.Version(),
443450
getproviders.CurrentPlatform.String(),
444-
authResult.String(),
451+
authentication,
445452
hashList.String(),
446453
),
447454
Description: fmt.Sprintf(`Check the details above for provider %q and confirm that you trust the provider.

0 commit comments

Comments
 (0)