diff --git a/pkg/ami/static_resolver_test.go b/pkg/ami/static_resolver_test.go index ea6c8a7dfa..6d140ca7d0 100644 --- a/pkg/ami/static_resolver_test.go +++ b/pkg/ami/static_resolver_test.go @@ -88,6 +88,14 @@ var _ = Describe("AMI Static Resolution", func() { ExpectedAMI: "ami-042f9abf2f96a0097", ExpectError: false, }), + Entry("with gpu (g3) instance and eu-west-1", ResolveCase{ + Region: "eu-west-1", + Version: "1.12", + InstanceType: "g3.4xlarge", + ImageFamily: "AmazonLinux2", + ExpectedAMI: "ami-042f9abf2f96a0097", + ExpectError: false, + }), Entry("with gpu (p3) instance and non-existent region", ResolveCase{ Region: "eu-east-1", Version: "1.12", diff --git a/pkg/utils/utils.go b/pkg/utils/utils.go index 1acfa0893e..814472024b 100644 --- a/pkg/utils/utils.go +++ b/pkg/utils/utils.go @@ -7,7 +7,7 @@ import ( // IsGPUInstanceType returns tru of the instance type is GPU // optimised. func IsGPUInstanceType(instanceType string) bool { - return strings.HasPrefix(instanceType, "p2") || strings.HasPrefix(instanceType, "p3") + return strings.HasPrefix(instanceType, "p2") || strings.HasPrefix(instanceType, "p3") || strings.HasPrefix(instanceType, "g3") } // HasGPUInstanceType returns true if it finds a gpu instance among the mixed instances