func resourceDNSCreate(d *schema.ResourceData, m interface{}) error { err := resourceDNSRead(d, m) if err != nil { return err } d.SetId(d.Get("host").(string)) return nil }
func resourceDNSRead(d *schema.ResourceData, m interface{}) error { ips, err := getIPs(d.Get("host").(string)) if err != nil { return err } if len(ips) == 0 { return fmt.Errorf("No IP addresses found for %s", d.Get("host")) } d.Set("ip_address", ips[0]) d.Set("ip_address_csv", strings.Join(ips, ",")) return nil }
func resourceServerCreate(d *schema.ResourceData, m interface{}) error { d.SetId(d.Get("address").(string)) return nil }