From a62b645c8ac799091bdec7502b6dd4a4a8f21105 Mon Sep 17 00:00:00 2001 From: Matthias Teich Date: Wed, 28 Aug 2024 12:57:34 +0200 Subject: [PATCH] Fix linter issues --- internal/service/cloud/server.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/internal/service/cloud/server.go b/internal/service/cloud/server.go index b24f0c53..7bbda6c5 100644 --- a/internal/service/cloud/server.go +++ b/internal/service/cloud/server.go @@ -416,6 +416,7 @@ func (s *Service) buildServerEntities(ms *scope.Machine, params serverEntityPara Properties: &sdk.NicProperties{ Lan: ¶ms.lanID, Name: ptr.To(s.nicName(ms.IonosMachine)), + Dhcp: ptr.To(true), }, } @@ -425,8 +426,6 @@ func (s *Service) buildServerEntities(ms *scope.Machine, params serverEntityPara primaryNIC.Properties.Ipv6Ips = ptr.To(nicInfo.IPv6Addresses) } - primaryNIC.Properties.Dhcp = ptr.To(true) - // In case we want to retrieve a public IP from the DHCP, we need to // create a NIC with empty IP addresses and patch the NIC afterward. // To simplify the code we also follow this approach when using IP pools. @@ -454,8 +453,6 @@ func (s *Service) buildServerEntities(ms *scope.Machine, params serverEntityPara nic.Properties.Ipv6Ips = ptr.To(nicInfo.IPv6Addresses) } - nic.Properties.Dhcp = ptr.To(true) - items = append(items, nic) }