From 27a033c3dd18a5cda6eefeb98e9b18807d6dfc08 Mon Sep 17 00:00:00 2001 From: Sergiu Ghitea Date: Tue, 19 Apr 2022 17:28:56 +0200 Subject: [PATCH] Remove deprecated verification_method from custom domain resource --- auth0/resource_auth0_custom_domain.go | 16 ++++------------ docs/resources/custom_domain.md | 3 +-- 2 files changed, 5 insertions(+), 14 deletions(-) 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