Skip to content

fix(config): use SCW_CLI_CONFIG_PATH with set config #4682

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

Merged
merged 1 commit into from
Apr 22, 2025

Conversation

Gnoale
Copy link
Contributor

@Gnoale Gnoale commented Apr 18, 2025

Community Note

Description

The SCW_CLI_CONFIG_PATH environment variable is used to specify a custom configuration path but it was not used consistently inside the config sub commands

You can now setup a config with

SCW_CLI_CONFIG_PATH="./my_config.yml" scw config set \
    access-key=<UUID> \
    secret-key=<UUID> \
    default-project-id=<UUID> \
    default-region=fr-par \
    default-organization-id=<UUID>

And use the environment variable to use the configuration file in further commands

SCW_CLI_CONFIG_PATH="./my_config.yml" scw config info
ConfigPath                       ./my_config.yml
ProfileName                      default
Profile.access-key               ***
Profile.default-organization-id  ***
Profile.default-project-id       ***
Profile.default-region           fr-par
Profile.secret-key               ***

Should address this issue

@Gnoale Gnoale requested review from a team and remyleone as code owners April 18, 2025 16:42
@remyleone remyleone linked an issue Apr 22, 2025 that may be closed by this pull request
@remyleone remyleone added this pull request to the merge queue Apr 22, 2025
Merged via the queue into master with commit d200474 Apr 22, 2025
16 checks passed
@remyleone remyleone deleted the config-scw-fix branch April 22, 2025 13:57
Laure-di pushed a commit to scaleway-bot/scaleway-cli that referenced this pull request May 15, 2025
remyleone added a commit that referenced this pull request Jun 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

scw config set crashes if there is no config.yaml present
2 participants