func resourceDnsDomainExists(d *schema.ResourceData, meta interface{}) (bool, error) {
	client, err := meta.(*Config).dnsClient()
	if err != nil {
		return false, fmt.Errorf("Error creating ConoHa dns client: %s", err)
	}

	_, err = domains.Get(client, d.Id()).Extract()
	if err != nil {
		if code, ok := err.(*gophercloud.UnexpectedResponseCodeError); ok && code.Actual == 404 {
			return false, nil
		}
		return false, err
	}

	return true, nil
}
func resourceDnsDomainRead(d *schema.ResourceData, meta interface{}) error {
	client, err := meta.(*Config).dnsClient()
	if err != nil {
		return fmt.Errorf("Error creating ConoHa dns client: %s", err)
	}

	domain, err := domains.Get(client, d.Id()).Extract()
	if err != nil {
		return err
	}

	d.Set("name", domain.Name)
	d.Set("email", domain.Email)

	return nil
}