Skip to content

Commit 2122ad7

Browse files
authored
docs(lb): fix error message on ip attach error (#873)
Error message was copied from the "label selector target" method, but not updated for "ip target". This causes confusing error messages.
1 parent ed4c28b commit 2122ad7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal/loadbalancer/resource_target.go

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import (
1313

1414
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
1515
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/validation"
16+
1617
"github.com/hetznercloud/hcloud-go/hcloud"
1718
"github.com/hetznercloud/terraform-provider-hcloud/internal/control"
1819
"github.com/hetznercloud/terraform-provider-hcloud/internal/util/hcloudutil"
@@ -252,7 +253,7 @@ func resourceLoadBalancerCreateIPTarget(
252253
return nil, tgt, nil
253254
}
254255
if err != nil {
255-
return nil, tgt, fmt.Errorf("add label selector target: %v", err)
256+
return nil, tgt, fmt.Errorf("add ip target: %v", err)
256257
}
257258
return action, tgt, nil
258259
}

0 commit comments

Comments
 (0)