From 0a44e4544a98bd4475073288aa114d95bf092e66 Mon Sep 17 00:00:00 2001 From: Cesar Wong Date: Mon, 16 Dec 2024 10:56:59 -0500 Subject: [PATCH] Only use public IPs for 4.16 and above Currently CAPI is not allowing instances with Public IPs in 4.15 and earlier. For now, this change only enables public IPs for versions 4.16 and newer. --- test/e2e/e2e_test.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/e2e/e2e_test.go b/test/e2e/e2e_test.go index 3bc1881528..ffffdb70a6 100644 --- a/test/e2e/e2e_test.go +++ b/test/e2e/e2e_test.go @@ -22,6 +22,7 @@ import ( "github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws/awserr" "github.com/aws/aws-sdk-go/service/s3" + "github.com/blang/semver" "github.com/go-logr/logr" "github.com/go-logr/zapr" hyperv1 "github.com/openshift/hypershift/api/hypershift/v1beta1" @@ -582,6 +583,10 @@ func (o *options) DefaultAWSOptions() hypershiftaws.RawCreateOptions { MultiArch: o.configurableClusterOptions.AWSMultiArch, PublicOnly: true, } + if e2eutil.IsLessThan(semver.MustParse("4.16.0")) { + opts.PublicOnly = false + } + opts.AdditionalTags = append(opts.AdditionalTags, o.additionalTags...) if len(o.configurableClusterOptions.Zone) == 0 { // align with default for e2e.aws-region flag