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

Fix custom domain verification example in documentation #1173

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

hozzer
Copy link

@hozzer hozzer commented Mar 4, 2025

🔧 Changes

The documentation for the auth0_custom_domain_verification resource references the wrong value in the name field in the digitalocean_record resource block example:

resource "auth0_custom_domain" "my_custom_domain" {
  domain = "login.example.com"
  type   = "auth0_managed_certs"
}

...

resource "digitalocean_record" "my_domain_name_record" {
  domain = "example.com"
  type   = upper(auth0_custom_domain.my_custom_domain.verification[0].methods[0].name)
  name   = "${auth0_custom_domain.my_custom_domain.domain}." # Incorrect reference to "login.example.com"
  value  = "${auth0_custom_domain.my_custom_domain.verification[0].methods[0].record}."
}

This would create the following record for the example.com domain:

Record Name Type Value
login.example.com. TXT "SOME_UUID_V4"

which incorrectly constructs the record as login.example.com.example.com

Instead, we want:

Record Name Type Value
_cf-custom-hostname.login TXT "SOME_UUID_V4"

which correct constructs the intended DNS record as _cf-custom-hostname.login.example.com

An example auth0_custom_domain.my_custom_domain.verification[0].methods would look like this:

"methods" = tolist([
  tomap({
    "domain" = "_cf-custom-hostname.login.example.com"
    "name" = "TXT"
    "record" = "SOME_UUID_V4"
  })
])

So we should make use of auth0_custom_domain.my_custom_domain.verification[0].methods[0].domain instead. Note we also need to remove the .example.com suffix.

@hozzer hozzer requested a review from a team as a code owner March 4, 2025 12:10
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.

1 participant