Skip to content

Having a scw infos that dump where the configuration is found #978

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
remyleone opened this issue May 1, 2020 · 1 comment · Fixed by #1075
Closed

Having a scw infos that dump where the configuration is found #978

remyleone opened this issue May 1, 2020 · 1 comment · Fixed by #1075
Milestone

Comments

@remyleone
Copy link
Member

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Description

At the moment I don't have a clear way to know where my configuration come from. Let's suppose that I got a token defined in an environment variable and another defined in the configuration file, I don't have much help to figure out which one is currently being used while doing a request. This could be error-prone in the case where several projects with different identifiers are used concurrently.

How I imagine scw could expose this functionality

scw infos

This will show me a detailed report of the current location of all data that I use, where they are fetched from.

@jerome-quere jerome-quere added this to the v2.0.0 milestone May 18, 2020
@jerome-quere
Copy link
Contributor

$> scw infos
config_path               ~/.config/scw/config.yaml
default_region            fr-par     SCW_SECRET_KEY env
default_zone              fr-par-1   config_file
default_organization_id   193-XXXX   config_file
access_key                SCWXXXXX   SCW_ACCESS_KEY env
secret_key                193-XXXX   config_file
profile                   default    flag | SCW_PROFILE | config_file
KEY: 
  - config_path
  - default_region
  - default_zone
  - default_organization_id
  - access_key
  - secret_key
  - profile

Value:
  - All value are print ( Mask part of secret key )
  - Use `-` if no value found

Origin:
  - env (SCW_XXXXX)
  - config_file
  - flag (-p)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants