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

PATCH: Add graceful error handling for `auth0_organization` data source when using client grants #1049

Closed duedares-rvj closed 1 month ago

duedares-rvj commented 1 month ago

The auth0_organization data source retrieves a list of connections, members, and client grants for a given organization. However, the client grants and organization association feature is only available to limited users. As a result, an empty slice of client grants is returned for tenants that do not have access to this feature.


🔧 Changes

📚 References

N/A

🔬 Testing

📝 Checklist

codecov-commenter commented 1 month ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 89.38%. Comparing base (de35ea1) to head (2482e42).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/auth0/terraform-provider-auth0/pull/1049/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/1049?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=auth0) ```diff @@ Coverage Diff @@ ## main #1049 +/- ## ========================================== + Coverage 89.37% 89.38% +0.01% ========================================== Files 126 126 Lines 17462 17464 +2 ========================================== + Hits 15606 15610 +4 + Misses 1317 1316 -1 + Partials 539 538 -1 ``` | [Files with missing lines](https://app.codecov.io/gh/auth0/terraform-provider-auth0/pull/1049?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=auth0) | Coverage Δ | | |---|---|---| | [internal/auth0/organization/data\_source.go](https://app.codecov.io/gh/auth0/terraform-provider-auth0/pull/1049?src=pr&el=tree&filepath=internal%2Fauth0%2Forganization%2Fdata_source.go&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=auth0#diff-aW50ZXJuYWwvYXV0aDAvb3JnYW5pemF0aW9uL2RhdGFfc291cmNlLmdv) | `88.51% <100.00%> (+1.52%)` | :arrow_up: |