Fix id of azurerm_lb_probe.
This commit is contained in:
parent
a0ad874d25
commit
e63d120b57
|
@ -128,7 +128,18 @@ func resourceArmLoadBalancerProbeCreate(d *schema.ResourceData, meta interface{}
|
|||
return fmt.Errorf("Cannot read LoadBalancer %s (resource group %s) ID", loadBalancerName, resGroup)
|
||||
}
|
||||
|
||||
d.SetId(*read.ID)
|
||||
var createdProbe_id string
|
||||
for _, element := range *(*read.Properties).Probes {
|
||||
if *element.Name == d.Get("name").(string) {
|
||||
createdProbe_id = *element.ID
|
||||
}
|
||||
}
|
||||
|
||||
if createdProbe_id != "" {
|
||||
d.SetId(createdProbe_id)
|
||||
} else {
|
||||
return fmt.Errorf("Error can not find created probe id %s", createdProbe_id)
|
||||
}
|
||||
|
||||
log.Printf("[DEBUG] Waiting for LoadBalancer (%s) to become available", loadBalancerName)
|
||||
stateConf := &resource.StateChangeConf{
|
||||
|
|
Loading…
Reference in New Issue