@@ -3,6 +3,7 @@ package loadbalancer
3
3
import (
4
4
"context"
5
5
"fmt"
6
+ "github.com/hashicorp/terraform-plugin-framework/resource/schema/booldefault"
6
7
"net/http"
7
8
"strings"
8
9
"time"
@@ -18,7 +19,6 @@ import (
18
19
"github.com/hashicorp/terraform-plugin-framework/path"
19
20
"github.com/hashicorp/terraform-plugin-framework/resource"
20
21
"github.com/hashicorp/terraform-plugin-framework/resource/schema"
21
- "github.com/hashicorp/terraform-plugin-framework/resource/schema/booldefault"
22
22
"github.com/hashicorp/terraform-plugin-framework/resource/schema/boolplanmodifier"
23
23
"github.com/hashicorp/terraform-plugin-framework/resource/schema/int64planmodifier"
24
24
"github.com/hashicorp/terraform-plugin-framework/resource/schema/listplanmodifier"
@@ -722,9 +722,8 @@ func (r *loadBalancerResource) Create(ctx context.Context, req resource.CreateRe
722
722
core .LogAndAddError (ctx , & resp .Diagnostics , "Error creating load balancer" , fmt .Sprintf ("Calling API: %v" , err ))
723
723
return
724
724
}
725
- loadBalancerName := * createResp .Name
726
725
727
- waitResp , err := wait .CreateLoadBalancerWaitHandler (ctx , r .client , projectId , region , loadBalancerName ).SetTimeout (90 * time .Minute ).WaitWithContext (ctx )
726
+ waitResp , err := wait .CreateLoadBalancerWaitHandler (ctx , r .client , projectId , region , * createResp . Name ).SetTimeout (90 * time .Minute ).WaitWithContext (ctx )
728
727
if err != nil {
729
728
core .LogAndAddError (ctx , & resp .Diagnostics , "Error creating load balancer" , fmt .Sprintf ("Load balancer creation waiting: %v" , err ))
730
729
return
0 commit comments