mirror of
https://github.com/starship/starship.git
synced 2026-06-22 02:02:12 +07:00
fix(aws): Only display AWS if there are credentials configured (#3504)
* only display aws on credential_process defined * add check for both credential_process and valid credentials * fix tests * update aws module documentation * add better explanation of requirements to documentation * add support for AWS_SECRET_ACCESS_KEY, AWS_SESSION_TOKEN, and update docs * remove credential_process env var
This commit is contained in:
@@ -270,11 +270,18 @@ format = "$all$directory$character"
|
||||
|
||||
## AWS
|
||||
|
||||
The `aws` module shows the current AWS region and profile. This is based on
|
||||
The `aws` module shows the current AWS region and profile when
|
||||
credentials or a `credential_process` have been setup. This is based on
|
||||
`AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with
|
||||
`~/.aws/config` file. This module also shows an expiration timer when using temporary
|
||||
credentials.
|
||||
|
||||
The module will display a profile only if its credentials are present in
|
||||
`~/.aws/credentials` or a `credential_process` is defined in
|
||||
`~/.aws/config`. Alternatively, having any of the `AWS_ACCESS_KEY_ID`,
|
||||
`AWS_SECRET_ACCESS_KEY`, or `AWS_SESSION_TOKEN` env vars defined will
|
||||
also suffice.
|
||||
|
||||
When using [aws-vault](https://github.com/99designs/aws-vault) the profile
|
||||
is read from the `AWS_VAULT` env var and the credentials expiration date
|
||||
is read from the `AWS_SESSION_EXPIRATION` env var.
|
||||
|
||||
Reference in New Issue
Block a user