pulumi-whoami
Show the current Pulumi user identity
TLDR
Print the username of the currently logged in user
Print detailed information about the currently logged in user
Print detailed information about the currently logged in user as JSON
Display help
SYNOPSIS
pulumi whoami [<options>]
PARAMETERS
--json
Emits the command output in a structured JSON format, useful for programmatic parsing.
--organization
Displays the name of the currently selected Pulumi organization associated with the logged-in user.
--cloud
Shows the identifier of the currently configured cloud backend or service provider Pulumi is interacting with (e.g., pulumi.com, AWS, Azure).
DESCRIPTION
The pulumi whoami command is a fundamental utility within the Pulumi Command Line Interface (CLI). Its primary purpose is to display the identity of the currently authenticated user in the Pulumi service or backend. This command is crucial for confirming which Pulumi account is active, especially when working with multiple accounts or different cloud backends. It helps developers ensure they are operating within the correct organizational context or against the intended cloud provider when deploying or managing infrastructure. The output typically includes the username or email associated with the logged-in account. Depending on the options used, it can also reveal the currently selected organization or the active cloud backend, providing a comprehensive overview of the current Pulumi environment's authentication state. This command is particularly useful for debugging authentication issues or simply verifying the active session.
CAVEATS
This command requires an active Pulumi login. If not logged in, it will typically prompt for login or return an authentication error.
The --organization and --cloud flags only display information if applicable to the current configuration or backend.
USAGE EXAMPLES
To simply check your current Pulumi user:
pulumi whoami
To see your user and the currently configured organization:
pulumi whoami --organization
To get the output in JSON format for scripting:
pulumi whoami --json
HISTORY
Pulumi itself was founded in 2017. The whoami command has been a staple from early versions of the Pulumi CLI, reflecting the fundamental need for users to verify their authentication status. It evolved as the Pulumi service expanded to support organizations and different cloud backends, leading to the addition of flags like --organization and --cloud to provide more context about the current working environment. Its simplicity and directness make it one of the most frequently used diagnostic commands for new and experienced Pulumi users alike.