diff --git a/auth0/resource_auth0_custom_domain.go b/auth0/resource_auth0_custom_domain.go index a15449e49..d48c8fd42 100644 --- a/auth0/resource_auth0_custom_domain.go +++ b/auth0/resource_auth0_custom_domain.go @@ -47,13 +47,6 @@ func newCustomDomain() *schema.Resource { Type: schema.TypeString, Computed: true, }, - "verification_method": { - Type: schema.TypeString, - Optional: true, - ForceNew: true, - Deprecated: "The method is chosen according to the type of the custom domain. CNAME for auth0_managed_certs, TXT for self_managed_certs", - ValidateFunc: validation.StringInSlice([]string{"txt"}, true), - }, "verification": { Type: schema.TypeList, Computed: true, @@ -72,7 +65,7 @@ func newCustomDomain() *schema.Resource { } func createCustomDomain(ctx context.Context, d *schema.ResourceData, m interface{}) diag.Diagnostics { - customDomain := buildCustomDomain(d) + customDomain := expandCustomDomain(d) api := m.(*management.Management) if err := api.CustomDomain.Create(customDomain); err != nil { return diag.FromErr(err) @@ -127,10 +120,9 @@ func deleteCustomDomain(ctx context.Context, d *schema.ResourceData, m interface return nil } -func buildCustomDomain(d *schema.ResourceData) *management.CustomDomain { +func expandCustomDomain(d *schema.ResourceData) *management.CustomDomain { return &management.CustomDomain{ - Domain: String(d, "domain"), - Type: String(d, "type"), - VerificationMethod: String(d, "verification_method"), + Domain: String(d, "domain"), + Type: String(d, "type"), } } diff --git a/docs/resources/custom_domain.md b/docs/resources/custom_domain.md index 485ec773c..6c366070b 100644 --- a/docs/resources/custom_domain.md +++ b/docs/resources/custom_domain.md @@ -26,8 +26,7 @@ Arguments accepted by this resource include: * `domain` - (Required) String. Name of the custom domain. * `type` - (Required) String. Provisioning type for the custom domain. Options include `auth0_managed_certs` and `self_managed_certs`. -* `verification_method` - (Deprecated) String. Domain verification method. The method is chosen according to the type of -the custom domain. `CNAME` for `auth0_managed_certs`, `TXT` for `self_managed_certs`. + ## Attribute Reference