Skip to content
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

Added explicit check for handling missing env variables for login #1065

Merged
merged 5 commits into from
Oct 31, 2024

Conversation

duedares-rvj
Copy link
Contributor

@duedares-rvj duedares-rvj commented Oct 29, 2024

Moved checking required env variables from ConfigureContextFunc to when the provider actually get configured in ConfigureProvider during the planning step.

This allows picking variable which might be declared in the tf file itself

provider "auth0" {
  domain        = "<domain>"
  client_id     = "<client-id>"
  client_secret = "<client-secret>"
  debug         = "<debug>"
}

The above is not recommended and use of env variables is advised.

🔧 Changes

📚 References

🔬 Testing

📝 Checklist

  • All new/changed/fixed functionality is covered by tests (or N/A)
  • I have added documentation for all new/changed functionality (or N/A)

@duedares-rvj duedares-rvj self-assigned this Oct 29, 2024
@duedares-rvj duedares-rvj requested a review from a team as a code owner October 29, 2024 19:51
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.35%. Comparing base (152ca2d) to head (db7685a).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1065      +/-   ##
==========================================
+ Coverage   89.27%   89.35%   +0.08%     
==========================================
  Files         126      126              
  Lines       17487    17481       -6     
==========================================
+ Hits        15612    15621       +9     
+ Misses       1335     1320      -15     
  Partials      540      540              
Files with missing lines Coverage Δ
internal/config/config.go 95.52% <100.00%> (-2.06%) ⬇️
internal/provider/provider.go 100.00% <100.00%> (+24.32%) ⬆️

@duedares-rvj duedares-rvj merged commit 4a0e957 into main Oct 31, 2024
5 checks passed
@duedares-rvj duedares-rvj deleted the env_var_check_updated branch October 31, 2024 06:49
kushalshit27 pushed a commit to Widcket/terraform-provider-auth0 that referenced this pull request Oct 31, 2024
Added explicit check for handling missing env variables for login (auth0#1065)

* Added explicit check for handling missing env variables for login

* Minor changes

* Minor update to test

* Updated test case

* Updated test case

Added support for Custom Email Provider (auth0#1064)

* Added support for custom email provider

* bump

* bump

* Dummy
duedares-rvj pushed a commit that referenced this pull request Oct 31, 2024
Remove IGA-* triggers

Added explicit check for handling missing env variables for login (#1065)

* Added explicit check for handling missing env variables for login

* Minor changes

* Minor update to test

* Updated test case

* Updated test case

Added support for Custom Email Provider (#1064)

* Added support for custom email provider

* bump

* bump

* Dummy

Co-authored-by: kushalshit27 <[email protected]>
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.

3 participants