auth0 / terraform-provider-auth0

The Auth0 Terraform Provider is the official plugin for managing Auth0 tenant configuration through the Terraform tool.
https://registry.terraform.io/providers/auth0/auth0/latest/docs
Mozilla Public License 2.0
167 stars 86 forks source link

Added a check on provider's configuration for required env vars #1053

Closed duedares-rvj closed 4 weeks ago

duedares-rvj commented 1 month ago

🔧 Changes

Added ConfigureContextFunc which checks if AUTH0_DOMAIN, AUTH0_CLIENT_ID and AUTH0_CLIENT_SECRET are configured before planning.

📚 References

Addressed https://github.com/auth0/terraform-provider-auth0/issues/1023

🔬 Testing

📝 Checklist

codecov-commenter commented 1 month ago

Codecov Report

Attention: Patch coverage is 0% with 18 lines in your changes missing coverage. Please review.

Project coverage is 89.27%. Comparing base (98823c3) to head (d6ca71a).

Files with missing lines Patch % Lines
internal/provider/provider.go 0.00% 17 Missing and 1 partial :warning:
Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/auth0/terraform-provider-auth0/pull/1053/graphs/tree.svg?width=650&height=150&src=pr&token=geObb1Hn9E&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=auth0)](https://app.codecov.io/gh/auth0/terraform-provider-auth0/pull/1053?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=auth0) ```diff @@ Coverage Diff @@ ## main #1053 +/- ## ========================================== - Coverage 89.37% 89.27% -0.10% ========================================== Files 126 126 Lines 17471 17487 +16 ========================================== - Hits 15614 15612 -2 - Misses 1318 1335 +17 - Partials 539 540 +1 ``` | [Files with missing lines](https://app.codecov.io/gh/auth0/terraform-provider-auth0/pull/1053?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=auth0) | Coverage Δ | | |---|---|---| | [internal/provider/provider.go](https://app.codecov.io/gh/auth0/terraform-provider-auth0/pull/1053?src=pr&el=tree&filepath=internal%2Fprovider%2Fprovider.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=auth0#diff-aW50ZXJuYWwvcHJvdmlkZXIvcHJvdmlkZXIuZ28=) | `75.67% <0.00%> (-24.33%)` | :arrow_down: |