Skip to content

Conversation

@ewanharris
Copy link
Contributor

🔧 Changes

Adds support for the auth0_organization_discovery_domain resource for managing via a 1:1 relationship and auth0_organization_discovery_domains for managing via a 1:many relationship.

Also adds the new organization_discovery_methods property to the auth0_client resource.

Example of the 1:many below

resource "auth0_organization" "awamcorp" {
  display_name = "Awam Corp"
  metadata     = {}
  name         = "awamcorp"
}

resource "auth0_organization_discovery_domains" "awamcorp" {
  organization_id = "org_z83dCOgHQo7lbhoZ"
  discovery_domains {
    domain = "awam.co"
    status = "verified"
  }
  discovery_domains {
    domain = "awam.com"
    status = "pending"
  }
}

And for the 1:1

resource "auth0_organization" "awamcorp" {
  display_name = "Awam Corp"
  metadata     = {}
  name         = "awamcorp"
}

resource "auth0_organization_discovery_domain" "awamcorp_awam_co" {
  organization_id = "org_z83dCOgHQo7lbhoZ"
  domain          = "awam.co"
  status          = "verified"
}

resource "auth0_organization_discovery_domain" "awamcorp_awam_com" {
  organization_id = "org_z83dCOgHQo7lbhoZ"
  domain          = "awam.com"
  status          = "pending"
}

📚 References

Related auth0-cli PR: auth0/auth0-cli#1349

🔬 Testing

Tested manually and tests added.

📝 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)

@ewanharris ewanharris requested a review from a team as a code owner September 30, 2025 15:46
@ewanharris ewanharris marked this pull request as draft September 30, 2025 15:48
@ewanharris ewanharris force-pushed the feat/organization-domain-discovery branch from df829ef to 858d7d5 Compare September 30, 2025 16:20
@ewanharris ewanharris force-pushed the feat/organization-domain-discovery branch from 858d7d5 to 8d6233d Compare October 16, 2025 10:53
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 82.95165% with 67 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.51%. Comparing base (20b3c30) to head (8d6233d).

Files with missing lines Patch % Lines
...l/auth0/organization/resource_discovery_domains.go 82.37% 30 Missing and 10 partials ⚠️
...al/auth0/organization/resource_discovery_domain.go 76.00% 16 Missing and 8 partials ⚠️
internal/auth0/organization/flatten.go 88.46% 2 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1375      +/-   ##
==========================================
- Coverage   87.59%   87.51%   -0.09%     
==========================================
  Files         156      158       +2     
  Lines       21873    22266     +393     
==========================================
+ Hits        19160    19486     +326     
- Misses       2016     2064      +48     
- Partials      697      716      +19     
Files with missing lines Coverage Δ
internal/auth0/client/expand.go 92.62% <100.00%> (+<0.01%) ⬆️
internal/auth0/client/flatten.go 94.03% <100.00%> (+<0.01%) ⬆️
internal/auth0/client/resource.go 98.83% <100.00%> (+0.01%) ⬆️
internal/auth0/organization/expand.go 100.00% <100.00%> (ø)
internal/provider/provider.go 98.85% <ø> (ø)
internal/auth0/organization/flatten.go 97.45% <88.46%> (-2.55%) ⬇️
...al/auth0/organization/resource_discovery_domain.go 76.00% <76.00%> (ø)
...l/auth0/organization/resource_discovery_domains.go 82.37% <82.37%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ewanharris ewanharris marked this pull request as ready for review October 16, 2025 11:17
@duedares-rvj duedares-rvj merged commit 9b96b96 into main Oct 30, 2025
4 checks passed
@duedares-rvj duedares-rvj deleted the feat/organization-domain-discovery branch October 30, 2025 06:30
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.

5 participants