Skip to content

Conversation

@0xd3e
Copy link
Contributor

@0xd3e 0xd3e commented Mar 3, 2025

This allows setting credentials and other options from environment variables like the CLI does.
Right now the environment variables take precedence. If profile is set and the env variable SCW_ACCESS_KEY and SCW_SECRET_KEY, the env variables will be used.

If this should be the other way around, please let me know.
I don't know if the presence of the env variables will affect the modules.

Fixes: #56

@0xd3e 0xd3e requested a review from remyleone as a code owner March 3, 2025 15:51
@remyleone remyleone changed the title Allow setting config options from environment feat: allow settings config options from environment Mar 4, 2025
@remyleone remyleone added this pull request to the merge queue Mar 4, 2025
Merged via the queue into scaleway:main with commit 46019f3 Mar 4, 2025
5 checks passed
@remyleone
Copy link
Member

Thanks a lot @0xd3e for you contribution :) We will iterate on it

@codecov-commenter
Copy link

codecov-commenter commented Mar 4, 2025

Codecov Report

Attention: Patch coverage is 12.50000% with 7 lines in your changes missing coverage. Please review.

Please upload report for BASE (main@ec4b0cc). Learn more about missing BASE report.

Files with missing lines Patch % Lines
plugins/inventory/scaleway.py 12.50% 7 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main      #57   +/-   ##
=======================================
  Coverage        ?   32.45%           
=======================================
  Files           ?       64           
  Lines           ?     4126           
  Branches        ?      813           
=======================================
  Hits            ?     1339           
  Misses          ?     2787           
  Partials        ?        0           
Flag Coverage Δ
sanity 32.45% <12.50%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

Allow setting credentials and other options from environment for inventory plugin

3 participants