From 31bf0e24df07274aad30f61ef3728dafcfd7fc3c Mon Sep 17 00:00:00 2001 From: Alex Kalyvitis Date: Wed, 7 Nov 2018 13:38:35 +0100 Subject: [PATCH] wrap verification with nil check to avoid exception (#56) --- auth0/resource_auth0_custom_domain.go | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/auth0/resource_auth0_custom_domain.go b/auth0/resource_auth0_custom_domain.go index 3ae9b4eb..11f45b72 100644 --- a/auth0/resource_auth0_custom_domain.go +++ b/auth0/resource_auth0_custom_domain.go @@ -83,9 +83,13 @@ func readCustomDomain(d *schema.ResourceData, m interface{}) error { d.Set("type", c.Type) d.Set("primary", c.Primary) d.Set("status", c.Status) - d.Set("verification", []map[string]interface{}{ - {"methods": c.Verification.Methods}, - }) + + if c.Verification != nil { + d.Set("verification", []map[string]interface{}{ + {"methods": c.Verification.Methods}, + }) + } + return nil }