Merge branch 'dev' into 'main'
This commit is contained in:
@@ -86,7 +86,7 @@ func resourceLBBackendCreate(ctx context.Context, d *schema.ResourceData, m inte
|
||||
return diag.FromErr(err)
|
||||
}
|
||||
|
||||
d.SetId(strconv.Itoa(d.Get("lb_id").(int)) + "-" + d.Get("name").(string))
|
||||
d.SetId(strconv.Itoa(d.Get("lb_id").(int)) + "#" + d.Get("name").(string))
|
||||
|
||||
_, err = utilityLBBackendCheckPresence(ctx, d, m)
|
||||
if err != nil {
|
||||
@@ -110,7 +110,7 @@ func resourceLBBackendRead(ctx context.Context, d *schema.ResourceData, m interf
|
||||
return diag.FromErr(err)
|
||||
}
|
||||
|
||||
lbId, _ := strconv.ParseInt(strings.Split(d.Id(), "-")[0], 10, 32)
|
||||
lbId, _ := strconv.ParseInt(strings.Split(d.Id(), "#")[0], 10, 32)
|
||||
|
||||
d.Set("lb_id", lbId)
|
||||
d.Set("name", b.Name)
|
||||
|
||||
@@ -90,7 +90,7 @@ func resourceLBBackendServerCreate(ctx context.Context, d *schema.ResourceData,
|
||||
return diag.FromErr(err)
|
||||
}
|
||||
|
||||
d.SetId(strconv.Itoa(d.Get("lb_id").(int)) + "-" + d.Get("backend_name").(string) + "-" + d.Get("name").(string))
|
||||
d.SetId(strconv.Itoa(d.Get("lb_id").(int)) + "#" + d.Get("backend_name").(string) + "#" + d.Get("name").(string))
|
||||
|
||||
_, err = utilityLBBackendServerCheckPresence(ctx, d, m)
|
||||
if err != nil {
|
||||
@@ -114,8 +114,8 @@ func resourceLBBackendServerRead(ctx context.Context, d *schema.ResourceData, m
|
||||
return diag.FromErr(err)
|
||||
}
|
||||
|
||||
lbId, _ := strconv.ParseInt(strings.Split(d.Id(), "-")[0], 10, 32)
|
||||
backendName := strings.Split(d.Id(), "-")[1]
|
||||
lbId, _ := strconv.ParseInt(strings.Split(d.Id(), "#")[0], 10, 32)
|
||||
backendName := strings.Split(d.Id(), "#")[1]
|
||||
|
||||
d.Set("lb_id", lbId)
|
||||
d.Set("backend_name", backendName)
|
||||
|
||||
@@ -58,7 +58,7 @@ func resourceLBFrontendCreate(ctx context.Context, d *schema.ResourceData, m int
|
||||
return diag.FromErr(err)
|
||||
}
|
||||
|
||||
d.SetId(strconv.Itoa(d.Get("lb_id").(int)) + "-" + d.Get("name").(string))
|
||||
d.SetId(strconv.Itoa(d.Get("lb_id").(int)) + "#" + d.Get("name").(string))
|
||||
|
||||
_, err = utilityLBFrontendCheckPresence(ctx, d, m)
|
||||
if err != nil {
|
||||
@@ -82,7 +82,7 @@ func resourceLBFrontendRead(ctx context.Context, d *schema.ResourceData, m inter
|
||||
return diag.FromErr(err)
|
||||
}
|
||||
|
||||
lbId, _ := strconv.ParseInt(strings.Split(d.Id(), "-")[0], 10, 32)
|
||||
lbId, _ := strconv.ParseInt(strings.Split(d.Id(), "#")[0], 10, 32)
|
||||
d.Set("lb_id", lbId)
|
||||
d.Set("backend_name", f.Backend)
|
||||
d.Set("name", f.Name)
|
||||
|
||||
@@ -60,7 +60,7 @@ func resourceLBFrontendBindCreate(ctx context.Context, d *schema.ResourceData, m
|
||||
return diag.FromErr(err)
|
||||
}
|
||||
|
||||
d.SetId(strconv.Itoa(d.Get("lb_id").(int)) + "-" + d.Get("frontend_name").(string) + "-" + d.Get("name").(string))
|
||||
d.SetId(strconv.Itoa(d.Get("lb_id").(int)) + "#" + d.Get("frontend_name").(string) + "#" + d.Get("name").(string))
|
||||
|
||||
_, err = utilityLBFrontendBindCheckPresence(ctx, d, m)
|
||||
if err != nil {
|
||||
@@ -84,8 +84,8 @@ func resourceLBFrontendBindRead(ctx context.Context, d *schema.ResourceData, m i
|
||||
return diag.FromErr(err)
|
||||
}
|
||||
|
||||
lbId, _ := strconv.ParseInt(strings.Split(d.Id(), "-")[0], 10, 32)
|
||||
frontendName := strings.Split(d.Id(), "-")[1]
|
||||
lbId, _ := strconv.ParseInt(strings.Split(d.Id(), "#")[0], 10, 32)
|
||||
frontendName := strings.Split(d.Id(), "#")[1]
|
||||
|
||||
d.Set("lb_id", lbId)
|
||||
d.Set("frontend_name", frontendName)
|
||||
|
||||
@@ -52,7 +52,7 @@ func utilityLBBackendCheckPresence(ctx context.Context, d *schema.ResourceData,
|
||||
if (d.Get("lb_id").(int)) != 0 {
|
||||
urlValues.Add("lbId", strconv.Itoa(d.Get("lb_id").(int)))
|
||||
} else {
|
||||
parameters := strings.Split(d.Id(), "-")
|
||||
parameters := strings.Split(d.Id(), "#")
|
||||
urlValues.Add("lbId", parameters[0])
|
||||
bName = parameters[1]
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ func utilityLBBackendServerCheckPresence(ctx context.Context, d *schema.Resource
|
||||
if (d.Get("lb_id").(int)) != 0 {
|
||||
urlValues.Add("lbId", strconv.Itoa(d.Get("lb_id").(int)))
|
||||
} else {
|
||||
parameters := strings.Split(d.Id(), "-")
|
||||
parameters := strings.Split(d.Id(), "#")
|
||||
urlValues.Add("lbId", parameters[0])
|
||||
bName = parameters[1]
|
||||
sName = parameters[2]
|
||||
|
||||
@@ -52,7 +52,7 @@ func utilityLBFrontendCheckPresence(ctx context.Context, d *schema.ResourceData,
|
||||
if (d.Get("lb_id").(int)) != 0 {
|
||||
urlValues.Add("lbId", strconv.Itoa(d.Get("lb_id").(int)))
|
||||
} else {
|
||||
parameters := strings.Split(d.Id(), "-")
|
||||
parameters := strings.Split(d.Id(), "#")
|
||||
urlValues.Add("lbId", parameters[0])
|
||||
fName = parameters[1]
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ func utilityLBFrontendBindCheckPresence(ctx context.Context, d *schema.ResourceD
|
||||
if (d.Get("lb_id").(int)) != 0 {
|
||||
urlValues.Add("lbId", strconv.Itoa(d.Get("lb_id").(int)))
|
||||
} else {
|
||||
parameters := strings.Split(d.Id(), "-")
|
||||
parameters := strings.Split(d.Id(), "#")
|
||||
urlValues.Add("lbId", parameters[0])
|
||||
fName = parameters[1]
|
||||
bName = parameters[2]
|
||||
|
||||
Reference in New Issue
Block a user