Addition of environment variable to interact with a specific profile
komish opened this issue · comments
It would be interesting to have the ability to specify an environment (as defined in ~/.rack/config
) in which you are working in at any given time. Effectively, this behavior should mimic the usage of --profile PROFILE_NAME
without having to pass the flag for every command (or maintain multiple configs, or adjust configs).
In a situation where one might interact with a certain profile for a given session that is not the default, this would save quite a few keystrokes at (hopefully) minimal effort in implementation of the change. It may also encourage longer, potentially more descriptive profile names by the end-user.
Definitely a feature request, not a bug in any way. Projected workflow may look like the following:
A sample, multi-profile configuration file is in use
username = johndoe
api-key = 123456
region = DFW
[johnaccount2]
username = doejohn
api-key = 654321
region = IAD
Export the variable and then run commands without having to specify --profile
for every command
$ export RS_PROFILE=johnaccount2
$ rack servers instance list