diff --git a/internal/floatingip/resource.go b/internal/floatingip/resource.go index ff4ab3674..0fc13d13c 100644 --- a/internal/floatingip/resource.go +++ b/internal/floatingip/resource.go @@ -304,10 +304,10 @@ func getFloatingIPAttributes(f *hcloud.FloatingIP) map[string]interface{} { return res } -func setProtection(ctx context.Context, c *hcloud.Client, f *hcloud.FloatingIP, delete bool) error { +func setProtection(ctx context.Context, c *hcloud.Client, f *hcloud.FloatingIP, deleteProtection bool) error { action, _, err := c.FloatingIP.ChangeProtection(ctx, f, hcloud.FloatingIPChangeProtectionOpts{ - Delete: &delete, + Delete: &deleteProtection, }, ) if err != nil { diff --git a/internal/loadbalancer/resource.go b/internal/loadbalancer/resource.go index 32e284793..4b3abd9b8 100644 --- a/internal/loadbalancer/resource.go +++ b/internal/loadbalancer/resource.go @@ -456,10 +456,10 @@ func algorithmToTerraformAlgorithm(algorithm hcloud.LoadBalancerAlgorithm) (tfAl return } -func setProtection(ctx context.Context, c *hcloud.Client, lb *hcloud.LoadBalancer, delete bool) error { +func setProtection(ctx context.Context, c *hcloud.Client, lb *hcloud.LoadBalancer, deleteProtection bool) error { action, _, err := c.LoadBalancer.ChangeProtection(ctx, lb, hcloud.LoadBalancerChangeProtectionOpts{ - Delete: &delete, + Delete: &deleteProtection, }, ) if err != nil { diff --git a/internal/network/resource.go b/internal/network/resource.go index 44f8719be..a65568ac5 100644 --- a/internal/network/resource.go +++ b/internal/network/resource.go @@ -238,10 +238,10 @@ func getNetworkAttributes(n *hcloud.Network) map[string]interface{} { } } -func setProtection(ctx context.Context, c *hcloud.Client, n *hcloud.Network, delete bool) error { +func setProtection(ctx context.Context, c *hcloud.Client, n *hcloud.Network, deleteProtection bool) error { action, _, err := c.Network.ChangeProtection(ctx, n, hcloud.NetworkChangeProtectionOpts{ - Delete: &delete, + Delete: &deleteProtection, }, ) if err != nil { diff --git a/internal/primaryip/resource.go b/internal/primaryip/resource.go index 098730783..29d22fc02 100644 --- a/internal/primaryip/resource.go +++ b/internal/primaryip/resource.go @@ -340,11 +340,11 @@ func getPrimaryIPAttributes(f *hcloud.PrimaryIP) map[string]interface{} { return res } -func setProtection(ctx context.Context, c *hcloud.Client, primaryIP *hcloud.PrimaryIP, delete bool) error { +func setProtection(ctx context.Context, c *hcloud.Client, primaryIP *hcloud.PrimaryIP, deleteProtection bool) error { action, _, err := c.PrimaryIP.ChangeProtection(ctx, hcloud.PrimaryIPChangeProtectionOpts{ ID: primaryIP.ID, - Delete: delete, + Delete: deleteProtection, }, ) if err != nil { diff --git a/internal/volume/resource.go b/internal/volume/resource.go index 18939b23b..e4f1352d9 100644 --- a/internal/volume/resource.go +++ b/internal/volume/resource.go @@ -411,10 +411,10 @@ func getVolumeAttributes(v *hcloud.Volume) map[string]interface{} { return res } -func setProtection(ctx context.Context, c *hcloud.Client, v *hcloud.Volume, delete bool) error { +func setProtection(ctx context.Context, c *hcloud.Client, v *hcloud.Volume, deleteProtection bool) error { action, _, err := c.Volume.ChangeProtection(ctx, v, hcloud.VolumeChangeProtectionOpts{ - Delete: &delete, + Delete: &deleteProtection, }, ) if err != nil {