Skip to content

Commit 25e22d6

Browse files
authored
Skip service quota validation in unsupported regions (#825)
1 parent cf151a8 commit 25e22d6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/types/clusterconfig/clusterconfig.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import (
2222
"strings"
2323

2424
"github.com/aws/amazon-vpc-cni-k8s/pkg/awsutils"
25+
"github.com/aws/aws-sdk-go/aws/awserr"
2526
"github.com/cortexlabs/cortex/pkg/consts"
2627
"github.com/cortexlabs/cortex/pkg/lib/aws"
2728
cr "github.com/cortexlabs/cortex/pkg/lib/configreader"
@@ -425,7 +426,10 @@ func (cc *Config) Validate(awsClient *aws.Client) error {
425426
}
426427

427428
if err := awsClient.VerifyInstanceQuota(*cc.InstanceType); err != nil {
428-
return errors.Wrap(err, InstanceTypeKey)
429+
// Skip AWS errors, since some regions (e.g. eu-north-1) do not support this API
430+
if _, ok := errors.Cause(err).(awserr.Error); !ok {
431+
return errors.Wrap(err, InstanceTypeKey)
432+
}
429433
}
430434

431435
if len(cc.AvailabilityZones) > 0 {

0 commit comments

Comments
 (0)