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
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions docs/resources/custom_domain_verification.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,13 @@ resource "auth0_custom_domain_verification" "my_custom_domain_verification" {
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}."
value = "${auth0_custom_domain.my_custom_domain.verification[0].methods[0].record}."
name = trimsuffix(auth0_custom_domain.my_custom_domain.verification[0].methods[0].domain, ".example.com")
value = auth0_custom_domain.my_custom_domain.verification[0].methods[0].record
}

# Note: The trimsuffix() function prevents DNS record duplication by removing
# the base domain from the verification domain name. Without this, you would
# end up with a record like _cf-custom-hostname.login.example.com.example.com
```

<!-- schema generated by tfplugindocs -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ resource "auth0_custom_domain_verification" "my_custom_domain_verification" {
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}."
value = "${auth0_custom_domain.my_custom_domain.verification[0].methods[0].record}."
name = trimsuffix(auth0_custom_domain.my_custom_domain.verification[0].methods[0].domain, ".example.com")
value = auth0_custom_domain.my_custom_domain.verification[0].methods[0].record
}

# Note: The trimsuffix() function prevents DNS record duplication by removing
# the base domain from the verification domain name. Without this, you would
# end up with a record like _cf-custom-hostname.login.example.com.example.com