From fe3a28f84bf35e3f773a41bc9b4f3a5f85db5a3e Mon Sep 17 00:00:00 2001 From: Tobias Trabelsi Date: Sun, 5 Nov 2023 20:54:41 +0100 Subject: [PATCH] disable ipv4 in agent --- internal/hetzner/hetzneragent.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/hetzner/hetzneragent.go b/internal/hetzner/hetzneragent.go index 952562f..5294581 100644 --- a/internal/hetzner/hetzneragent.go +++ b/internal/hetzner/hetzneragent.go @@ -82,6 +82,11 @@ func CreateNewAgent(cfg *config.Config) (*hcloud.Server, error) { return nil, errors.New(fmt.Sprintf("Could not parse agent spec: %s", err.Error())) } + networkConf := hcloud.ServerCreatePublicNet{ + EnableIPv4: false, + EnableIPv6: true, + } + res, _, err := client.Server.Create(context.Background(), hcloud.ServerCreateOpts{ Name: name, ServerType: pln, @@ -92,6 +97,7 @@ func CreateNewAgent(cfg *config.Config) (*hcloud.Server, error) { UserData: userdata, StartAfterCreate: utils.BoolPointer(true), Labels: labels, + PublicNet: &networkConf, }) if err != nil {