diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 873dfba..3826f18 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -3,7 +3,6 @@ name: EC2 Instance Selector CI and Release on: [push, pull_request, workflow_dispatch] env: - DEFAULT_GO_VERSION: ^1.23 GITHUB_USERNAME: ${{ secrets.EC2_BOT_GITHUB_USERNAME }} GITHUB_TOKEN: ${{ secrets.EC2_BOT_GITHUB_TOKEN }} DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} @@ -16,13 +15,15 @@ jobs: name: Build and Test runs-on: ubuntu-20.04 steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v4 + - name: Set up Go 1.x - uses: actions/setup-go@v2 + uses: actions/setup-go@v5 with: - go-version: ${{ env.DEFAULT_GO_VERSION }} - - - name: Check out code into the Go module directory - uses: actions/checkout@v3 + go-version-file: 'go.mod' + check-latest: true + cache-dependency-path: '**/go.sum' - name: Unit Tests run: make unit-test @@ -57,13 +58,15 @@ jobs: needs: [buildAndTest] if: github.event_name == 'push' && contains(github.ref, 'refs/tags/') steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v4 + - name: Set up Go 1.x - uses: actions/setup-go@v2 + uses: actions/setup-go@v5 with: - go-version: ${{ env.DEFAULT_GO_VERSION }} - - - name: Check out code into the Go module directory - uses: actions/checkout@v2 + go-version-file: 'go.mod' + check-latest: true + cache-dependency-path: '**/go.sum' - name: Release Assets run: make release diff --git a/.github/workflows/golangci-lint.yaml b/.github/workflows/golangci-lint.yaml index 5324d6f..7d57493 100644 --- a/.github/workflows/golangci-lint.yaml +++ b/.github/workflows/golangci-lint.yaml @@ -17,8 +17,8 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: - go-version: stable + go-version-file: 'go.mod' + check-latest: true + cache-dependency-path: '**/go.sum' - name: golangci-lint - uses: golangci/golangci-lint-action@v6 - with: - version: v1.60 \ No newline at end of file + uses: golangci/golangci-lint-action@v6 \ No newline at end of file diff --git a/README.md b/README.md index 3f7db4d..5fbb032 100644 --- a/README.md +++ b/README.md @@ -106,21 +106,21 @@ c6gn.16xlarge c6in.16xlarge c7gn.8xlarge dl1.24xlarge +f2.48xlarge g4dn.metal g5.48xlarge g6.48xlarge g6e.12xlarge i3en.24xlarge i3en.metal +i7ie.24xlarge +i7ie.48xlarge im4gn.16xlarge inf1.24xlarge inf2.48xlarge m5dn.24xlarge m5dn.metal -m5n.24xlarge -m5n.metal -m5zn.12xlarge -NOTE: 19 entries were truncated, increase --max-results to see more +NOTE: 22 entries were truncated, increase --max-results to see more ``` **Short Table Output** @@ -149,20 +149,20 @@ t3a.medium 2 4 $ ec2-instance-selector --memory 4 --vcpus 2 --cpu-architecture x86_64 -r us-east-1 -o table-wide Instance Type VCPUs Mem (GiB) Hypervisor Current Gen Hibernation Support CPU Arch Network Performance ENIs GPUs GPU Mem (GiB) GPU Info On-Demand Price/Hr Spot Price/Hr ------------- ----- --------- ---------- ----------- ------------------- -------- ------------------- ---- ---- ------------- -------- ------------------ ------------- -c5.large 2 4 nitro true true x86_64 Up to 10 Gigabit 3 0 0 none $0.085 $0.0405 -c5a.large 2 4 nitro true false x86_64 Up to 10 Gigabit 3 0 0 none $0.077 $0.0308 -c5ad.large 2 4 nitro true false x86_64 Up to 10 Gigabit 3 0 0 none $0.086 $0.0415 -c5d.large 2 4 nitro true true x86_64 Up to 10 Gigabit 3 0 0 none $0.096 $0.0281 -c6a.large 2 4 nitro true false x86_64 Up to 12.5 Gigabit 3 0 0 none $0.0765 $0.0285 -c6i.large 2 4 nitro true true x86_64 Up to 12.5 Gigabit 3 0 0 none $0.085 $0.0292 -c6id.large 2 4 nitro true true x86_64 Up to 12.5 Gigabit 3 0 0 none $0.1008 $0.0391 -c6in.large 2 4 nitro true false x86_64 Up to 25 Gigabit 3 0 0 none $0.1134 $0.0403 -c7a.large 2 4 nitro true true x86_64 Up to 12.5 Gigabit 3 0 0 none $0.10264 $0.0457 -c7i-flex.large 2 4 nitro true true x86_64 Up to 12.5 Gigabit 3 0 0 none $0.08479 $0.022 -c7i.large 2 4 nitro true true x86_64 Up to 12.5 Gigabit 3 0 0 none $0.08925 $0.0359 -t2.medium 2 4 xen true true i386, x86_64 Low to Moderate 3 0 0 none $0.0464 $0.0156 -t3.medium 2 4 nitro true true x86_64 Up to 5 Gigabit 3 0 0 none $0.0416 $0.015 -t3a.medium 2 4 nitro true true x86_64 Up to 5 Gigabit 3 0 0 none $0.0376 $0.0106 +c5.large 2 4 nitro true true x86_64 Up to 10 Gigabit 3 0 0 none $0.085 $0.0264 +c5a.large 2 4 nitro true false x86_64 Up to 10 Gigabit 3 0 0 none $0.077 $0.025 +c5ad.large 2 4 nitro true false x86_64 Up to 10 Gigabit 3 0 0 none $0.086 $0.0358 +c5d.large 2 4 nitro true true x86_64 Up to 10 Gigabit 3 0 0 none $0.096 $0.036 +c6a.large 2 4 nitro true true x86_64 Up to 12.5 Gigabit 3 0 0 none $0.0765 $0.0252 +c6i.large 2 4 nitro true true x86_64 Up to 12.5 Gigabit 3 0 0 none $0.085 $0.0252 +c6id.large 2 4 nitro true true x86_64 Up to 12.5 Gigabit 3 0 0 none $0.1008 $0.0359 +c6in.large 2 4 nitro true true x86_64 Up to 25 Gigabit 3 0 0 none $0.1134 $0.043 +c7a.large 2 4 nitro true true x86_64 Up to 12.5 Gigabit 3 0 0 none $0.10264 $0.0429 +c7i-flex.large 2 4 nitro true true x86_64 Up to 12.5 Gigabit 3 0 0 none $0.08479 $0.0245 +c7i.large 2 4 nitro true true x86_64 Up to 12.5 Gigabit 3 0 0 none $0.08925 $0.0367 +t2.medium 2 4 xen true true i386, x86_64 Low to Moderate 3 0 0 none $0.0464 $0.0135 +t3.medium 2 4 nitro true true x86_64 Up to 5 Gigabit 3 0 0 none $0.0416 $0.016 +t3a.medium 2 4 nitro true true x86_64 Up to 5 Gigabit 3 0 0 none $0.0376 $0.0108 ``` **Interactive Output** @@ -176,17 +176,17 @@ https://user-images.githubusercontent.com/68402662/184218343-6b236d4a-3fe6-42ae- $ ec2-instance-selector -r us-east-1 -o table-wide --max-results 10 --sort-by memory --sort-direction asc Instance Type VCPUs Mem (GiB) Hypervisor Current Gen Hibernation Support CPU Arch Network Performance ENIs GPUs GPU Mem (GiB) GPU Info On-Demand Price/Hr Spot Price/Hr ------------- ----- --------- ---------- ----------- ------------------- -------- ------------------- ---- ---- ------------- -------- ------------------ ------------- -t3a.nano 2 0.5 nitro true true x86_64 Up to 5 Gigabit 2 0 0 none $0.0047 $0.0018 t2.nano 1 0.5 xen true true i386, x86_64 Low to Moderate 2 0 0 none $0.0058 -Not Fetched- -t4g.nano 2 0.5 nitro true true arm64 Up to 5 Gigabit 2 0 0 none $0.0042 $0.0018 -t3.nano 2 0.5 nitro true true x86_64 Up to 5 Gigabit 2 0 0 none $0.0052 $0.0006 -t1.micro 1 0.6123 xen false false i386, x86_64 Very Low 2 0 0 none $0.02 $0.0021 -t3.micro 2 1 nitro true true x86_64 Up to 5 Gigabit 2 0 0 none $0.0104 $0.0029 -t2.micro 1 1 xen true true i386, x86_64 Low to Moderate 2 0 0 none $0.0116 $0.0016 -t4g.micro 2 1 nitro true true arm64 Up to 5 Gigabit 2 0 0 none $0.0084 $0.0024 -t3a.micro 2 1 nitro true true x86_64 Up to 5 Gigabit 2 0 0 none $0.0094 $0.0031 -m1.small 1 1.69922 xen false false i386, x86_64 Low 2 0 0 none $0.044 $0.0048 -NOTE: 832 entries were truncated, increase --max-results to see more +t4g.nano 2 0.5 nitro true true arm64 Up to 5 Gigabit 2 0 0 none $0.0042 $0.0011 +t3.nano 2 0.5 nitro true true x86_64 Up to 5 Gigabit 2 0 0 none $0.0052 $0.0011 +t3a.nano 2 0.5 nitro true true x86_64 Up to 5 Gigabit 2 0 0 none $0.0047 $0.0022 +t1.micro 1 0.6123 xen false false i386, x86_64 Very Low 2 0 0 none $0.02 $0.0024 +t2.micro 1 1 xen true true i386, x86_64 Low to Moderate 2 0 0 none $0.0116 $0.0029 +t3a.micro 2 1 nitro true true x86_64 Up to 5 Gigabit 2 0 0 none $0.0094 $0.0033 +t4g.micro 2 1 nitro true true arm64 Up to 5 Gigabit 2 0 0 none $0.0084 $0.0046 +t3.micro 2 1 nitro true true x86_64 Up to 5 Gigabit 2 0 0 none $0.0104 $0.0028 +m1.small 1 1.69922 xen false false i386, x86_64 Low 2 0 0 none $0.044 $0.0115 +NOTE: 855 entries were truncated, increase --max-results to see more ``` Available shorthand flags: vcpus, memory, gpu-memory-total, network-interfaces, spot-price, on-demand-price, instance-storage, ebs-optimized-baseline-bandwidth, ebs-optimized-baseline-throughput, ebs-optimized-baseline-iops, gpus, inference-accelerators @@ -203,9 +203,9 @@ u7in-16tb.224xlarge 896 16,384 nitro true false u7i-12tb.224xlarge 896 12,288 nitro true false x86_64 100 Gigabit 15 0 0 none $152.88 -Not Fetched- u-12tb1.112xlarge 448 12,288 nitro true false x86_64 100 Gigabit 15 0 0 none $109.2 -Not Fetched- u-9tb1.112xlarge 448 9,216 nitro true false x86_64 100 Gigabit 15 0 0 none $81.9 -Not Fetched- +u7i-8tb.112xlarge 448 8,192 nitro true false x86_64 100 Gigabit 15 0 0 none $83.72 -Not Fetched- u-6tb1.56xlarge 224 6,144 nitro true false x86_64 100 Gigabit 15 0 0 none $46.40391 -Not Fetched- -u-6tb1.112xlarge 448 6,144 nitro true false x86_64 100 Gigabit 15 0 0 none $54.6 -Not Fetched- -NOTE: 832 entries were truncated, increase --max-results to see more +NOTE: 855 entries were truncated, increase --max-results to see more ``` JSON path must point to a field in the [instancetype.Details struct](https://github.com/aws/amazon-ec2-instance-selector/blob/5bffbf2750ee09f5f1308bdc8d4b635a2c6e2721/pkg/instancetypes/instancetypes.go#L37). @@ -367,7 +367,7 @@ NOTE: There were no transformations on the filters to display "SpotPrice": null } ] -NOTE: 841 entries were truncated, increase --max-results to see more +NOTE: 864 entries were truncated, increase --max-results to see more ``` NOTE: Use this JSON format as reference when finding JSON paths for sorting @@ -395,8 +395,8 @@ Filter Flags: -z, --availability-zones strings Availability zones or zone ids to check EC2 capacity offered in specific AZs --baremetal Bare Metal instance types (.metal instances) -b, --burst-support Burstable instance types - -a, --cpu-architecture string CPU architecture [x86_64, amd64, x86_64_mac, i386, or arm64] - --cpu-manufacturer string CPU manufacturer [amd, intel, aws] + -a, --cpu-architecture string CPU architecture [x86_64, amd64, x86_64_mac, i386, arm64, or arm64_mac] + --cpu-manufacturer string CPU manufacturer [amd, intel, aws, apple] --current-generation Current generation instance types (explicitly set this to false to not return current generation instance types) --dedicated-hosts Dedicated Hosts supported --deny-list string List of instance types which should be excluded w/ regex syntax (Example: m[1-2]\.*) @@ -437,6 +437,7 @@ Filter Flags: --instance-storage string Amount of local instance storage (Example: 4 GiB) (sets --instance-storage-min and -max to the same value) --instance-storage-max string Maximum Amount of local instance storage (Example: 4 GiB) If --instance-storage-min is not specified, the lower bound will be 0 --instance-storage-min string Minimum Amount of local instance storage (Example: 4 GiB) If --instance-storage-max is not specified, the upper bound will be infinity + --instance-types strings Instance Type names (must be exact, use allow-list for regex) --ipv6 Instance Types that support IPv6 -m, --memory string Amount of Memory available (Example: 4 GiB) (sets --memory-min and -max to the same value) --memory-max string Maximum Amount of Memory available (Example: 4 GiB) If --memory-min is not specified, the lower bound will be 0 diff --git a/cmd/main.go b/cmd/main.go index 02fa00f..82ae98c 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -104,6 +104,7 @@ const ( dedicatedHosts = "dedicated-hosts" debug = "debug" generation = "generation" + instanceTypes = "instance-types" ) // Aggregate Filter Flags. @@ -167,8 +168,8 @@ Full docs can be found at github.com/aws/amazon-` + binName cli.Int32MinMaxRangeFlags(vcpus, cli.StringMe("c"), nil, "Number of vcpus available to the instance type.") cli.ByteQuantityMinMaxRangeFlags(memory, cli.StringMe("m"), nil, "Amount of Memory available (Example: 4 GiB)") cli.RatioFlag(vcpusToMemoryRatio, nil, nil, "The ratio of vcpus to GiBs of memory. (Example: 1:2)") - cli.StringOptionsFlag(cpuArchitecture, cli.StringMe("a"), nil, "CPU architecture [x86_64, amd64, x86_64_mac, i386, or arm64]", []string{"x86_64", "x86_64_mac", "amd64", "i386", "arm64"}) - cli.StringOptionsFlag(cpuManufacturer, nil, nil, "CPU manufacturer [amd, intel, aws]", []string{"amd", "intel", "aws"}) + cli.StringOptionsFlag(cpuArchitecture, cli.StringMe("a"), nil, "CPU architecture [x86_64, amd64, x86_64_mac, i386, arm64, or arm64_mac]", []string{"x86_64", "x86_64_mac", "amd64", "i386", "arm64", "arm64_mac"}) + cli.StringOptionsFlag(cpuManufacturer, nil, nil, "CPU manufacturer [amd, intel, aws, apple]", []string{"amd", "intel", "aws", "apple"}) cli.Int32MinMaxRangeFlags(gpus, cli.StringMe("g"), nil, "Total Number of GPUs (Example: 4)") cli.ByteQuantityMinMaxRangeFlags(gpuMemoryTotal, nil, nil, "Number of GPUs' total memory (Example: 4 GiB)") cli.StringFlag(gpuManufacturer, nil, nil, "GPU Manufacturer name (Example: NVIDIA)", nil) @@ -208,6 +209,7 @@ Full docs can be found at github.com/aws/amazon-` + binName cli.BoolFlag(autoRecovery, nil, nil, "EC2 Auto-Recovery supported") cli.BoolFlag(dedicatedHosts, nil, nil, "Dedicated Hosts supported") cli.IntMinMaxRangeFlags(generation, nil, nil, "Generation of the instance type (i.e. c7i.xlarge is 7)") + cli.StringSliceFlag(instanceTypes, nil, nil, "Instance Type names (must be exact, use allow-list for regex)") // Suite Flags - higher level aggregate filters that return opinionated result @@ -425,6 +427,7 @@ Full docs can be found at github.com/aws/amazon-` + binName AutoRecovery: cli.BoolMe(flags[autoRecovery]), DedicatedHosts: cli.BoolMe(flags[dedicatedHosts]), Generation: cli.IntRangeMe(flags[generation]), + InstanceTypes: cli.StringSliceMe(flags[instanceTypes]), } if flags[verbose] != nil { diff --git a/go.mod b/go.mod index fa0af9b..4f06685 100644 --- a/go.mod +++ b/go.mod @@ -4,13 +4,13 @@ go 1.23 require ( dario.cat/mergo v1.0.1 - github.com/aws/aws-sdk-go-v2 v1.32.6 - github.com/aws/aws-sdk-go-v2/config v1.28.0 - github.com/aws/aws-sdk-go-v2/service/ec2 v1.186.0 - github.com/aws/aws-sdk-go-v2/service/pricing v1.32.7 + github.com/aws/aws-sdk-go-v2 v1.36.1 + github.com/aws/aws-sdk-go-v2/config v1.29.6 + github.com/aws/aws-sdk-go-v2/service/ec2 v1.203.0 + github.com/aws/aws-sdk-go-v2/service/pricing v1.32.16 github.com/blang/semver/v4 v4.0.0 github.com/charmbracelet/bubbles v0.20.0 - github.com/charmbracelet/bubbletea v1.2.4 + github.com/charmbracelet/bubbletea v1.3.3 github.com/charmbracelet/lipgloss v1.0.0 github.com/evertras/bubble-table v0.17.1 github.com/mitchellh/go-homedir v1.1.0 @@ -19,25 +19,25 @@ require ( github.com/patrickmn/go-cache v2.1.0+incompatible github.com/samber/lo v1.47.0 github.com/spf13/cobra v1.8.1 - github.com/spf13/pflag v1.0.5 + github.com/spf13/pflag v1.0.6 go.uber.org/multierr v1.11.0 ) require ( github.com/atotto/clipboard v0.1.4 // indirect - github.com/aws/aws-sdk-go-v2/credentials v1.17.41 // indirect - github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.17 // indirect - github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.25 // indirect - github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.25 // indirect - github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0 // indirect - github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.2 // indirect - github.com/aws/aws-sdk-go-v2/service/sso v1.24.2 // indirect - github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.2 // indirect - github.com/aws/aws-sdk-go-v2/service/sts v1.32.2 // indirect - github.com/aws/smithy-go v1.22.1 // indirect + github.com/aws/aws-sdk-go-v2/credentials v1.17.59 // indirect + github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.28 // indirect + github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.32 // indirect + github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.32 // indirect + github.com/aws/aws-sdk-go-v2/internal/ini v1.8.2 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.2 // indirect + github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.13 // indirect + github.com/aws/aws-sdk-go-v2/service/sso v1.24.15 // indirect + github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.14 // indirect + github.com/aws/aws-sdk-go-v2/service/sts v1.33.14 // indirect + github.com/aws/smithy-go v1.22.2 // indirect github.com/aymanbagabas/go-osc52/v2 v2.0.1 // indirect - github.com/charmbracelet/x/ansi v0.4.5 // indirect + github.com/charmbracelet/x/ansi v0.8.0 // indirect github.com/charmbracelet/x/term v0.2.1 // indirect github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect @@ -50,7 +50,7 @@ require ( github.com/muesli/reflow v0.3.0 // indirect github.com/rivo/uniseg v0.4.7 // indirect github.com/sahilm/fuzzy v0.1.1 // indirect - golang.org/x/sync v0.9.0 // indirect - golang.org/x/sys v0.27.0 // indirect - golang.org/x/text v0.16.0 // indirect + golang.org/x/sync v0.11.0 // indirect + golang.org/x/sys v0.30.0 // indirect + golang.org/x/text v0.22.0 // indirect ) diff --git a/go.sum b/go.sum index 2d30c51..da2245e 100644 --- a/go.sum +++ b/go.sum @@ -2,48 +2,48 @@ dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s= dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk= github.com/atotto/clipboard v0.1.4 h1:EH0zSVneZPSuFR11BlR9YppQTVDbh5+16AmcJi4g1z4= github.com/atotto/clipboard v0.1.4/go.mod h1:ZY9tmq7sm5xIbd9bOK4onWV4S6X0u6GY7Vn0Yu86PYI= -github.com/aws/aws-sdk-go-v2 v1.32.6 h1:7BokKRgRPuGmKkFMhEg/jSul+tB9VvXhcViILtfG8b4= -github.com/aws/aws-sdk-go-v2 v1.32.6/go.mod h1:P5WJBrYqqbWVaOxgH0X/FYYD47/nooaPOZPlQdmiN2U= -github.com/aws/aws-sdk-go-v2/config v1.28.0 h1:FosVYWcqEtWNxHn8gB/Vs6jOlNwSoyOCA/g/sxyySOQ= -github.com/aws/aws-sdk-go-v2/config v1.28.0/go.mod h1:pYhbtvg1siOOg8h5an77rXle9tVG8T+BWLWAo7cOukc= -github.com/aws/aws-sdk-go-v2/credentials v1.17.41 h1:7gXo+Axmp+R4Z+AK8YFQO0ZV3L0gizGINCOWxSLY9W8= -github.com/aws/aws-sdk-go-v2/credentials v1.17.41/go.mod h1:u4Eb8d3394YLubphT4jLEwN1rLNq2wFOlT6OuxFwPzU= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.17 h1:TMH3f/SCAWdNtXXVPPu5D6wrr4G5hI1rAxbcocKfC7Q= -github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.17/go.mod h1:1ZRXLdTpzdJb9fwTMXiLipENRxkGMTn1sfKexGllQCw= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.25 h1:s/fF4+yDQDoElYhfIVvSNyeCydfbuTKzhxSXDXCPasU= -github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.25/go.mod h1:IgPfDv5jqFIzQSNbUEMoitNooSMXjRSDkhXv8jiROvU= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.25 h1:ZntTCl5EsYnhN/IygQEUugpdwbhdkom9uHcbCftiGgA= -github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.25/go.mod h1:DBdPrgeocww+CSl1C8cEV8PN1mHMBhuCDLpXezyvWkE= -github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1 h1:VaRN3TlFdd6KxX1x3ILT5ynH6HvKgqdiXoTxAF4HQcQ= -github.com/aws/aws-sdk-go-v2/internal/ini v1.8.1/go.mod h1:FbtygfRFze9usAadmnGJNc8KsP346kEe+y2/oyhGAGc= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.186.0 h1:n2l2WeV+lEABrGwG/4MsE0WFEbd3j7yKsmZzbnEm5CY= -github.com/aws/aws-sdk-go-v2/service/ec2 v1.186.0/go.mod h1:kYXaB4FzyhEJjvrJ84oPnMElLiEAjGxxUunVW2tBSng= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0 h1:TToQNkvGguu209puTojY/ozlqy2d/SFNcoLIqTFi42g= -github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.0/go.mod h1:0jp+ltwkf+SwG2fm/PKo8t4y8pJSgOCO4D8Lz3k0aHQ= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.2 h1:s7NA1SOw8q/5c0wr8477yOPp0z+uBaXBnLE0XYb0POA= -github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.2/go.mod h1:fnjjWyAW/Pj5HYOxl9LJqWtEwS7W2qgcRLWP+uWbss0= -github.com/aws/aws-sdk-go-v2/service/pricing v1.32.7 h1:9UDHX1ZgcXUTAGcyxmw04r/6OVG/aUpQ7dZUziR+vTM= -github.com/aws/aws-sdk-go-v2/service/pricing v1.32.7/go.mod h1:68s1DYctoo30LibzEY6gLajXbQEhxpn49+zYFy+Q5Xs= -github.com/aws/aws-sdk-go-v2/service/sso v1.24.2 h1:bSYXVyUzoTHoKalBmwaZxs97HU9DWWI3ehHSAMa7xOk= -github.com/aws/aws-sdk-go-v2/service/sso v1.24.2/go.mod h1:skMqY7JElusiOUjMJMOv1jJsP7YUg7DrhgqZZWuzu1U= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.2 h1:AhmO1fHINP9vFYUE0LHzCWg/LfUWUF+zFPEcY9QXb7o= -github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.2/go.mod h1:o8aQygT2+MVP0NaV6kbdE1YnnIM8RRVQzoeUH45GOdI= -github.com/aws/aws-sdk-go-v2/service/sts v1.32.2 h1:CiS7i0+FUe+/YY1GvIBLLrR/XNGZ4CtM1Ll0XavNuVo= -github.com/aws/aws-sdk-go-v2/service/sts v1.32.2/go.mod h1:HtaiBI8CjYoNVde8arShXb94UbQQi9L4EMr6D+xGBwo= -github.com/aws/smithy-go v1.22.1 h1:/HPHZQ0g7f4eUeK6HKglFz8uwVfZKgoI25rb/J+dnro= -github.com/aws/smithy-go v1.22.1/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= +github.com/aws/aws-sdk-go-v2 v1.36.1 h1:iTDl5U6oAhkNPba0e1t1hrwAo02ZMqbrGq4k5JBWM5E= +github.com/aws/aws-sdk-go-v2 v1.36.1/go.mod h1:5PMILGVKiW32oDzjj6RU52yrNrDPUHcbZQYr1sM7qmM= +github.com/aws/aws-sdk-go-v2/config v1.29.6 h1:fqgqEKK5HaZVWLQoLiC9Q+xDlSp+1LYidp6ybGE2OGg= +github.com/aws/aws-sdk-go-v2/config v1.29.6/go.mod h1:Ft+WLODzDQmCTHDvqAH1JfC2xxbZ0MxpZAcJqmE1LTQ= +github.com/aws/aws-sdk-go-v2/credentials v1.17.59 h1:9btwmrt//Q6JcSdgJOLI98sdr5p7tssS9yAsGe8aKP4= +github.com/aws/aws-sdk-go-v2/credentials v1.17.59/go.mod h1:NM8fM6ovI3zak23UISdWidyZuI1ghNe2xjzUZAyT+08= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.28 h1:KwsodFKVQTlI5EyhRSugALzsV6mG/SGrdjlMXSZSdso= +github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.28/go.mod h1:EY3APf9MzygVhKuPXAc5H+MkGb8k/DOSQjWS0LgkKqI= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.32 h1:BjUcr3X3K0wZPGFg2bxOWW3VPN8rkE3/61zhP+IHviA= +github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.32/go.mod h1:80+OGC/bgzzFFTUmcuwD0lb4YutwQeKLFpmt6hoWapU= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.32 h1:m1GeXHVMJsRsUAqG6HjZWx9dj7F5TR+cF1bjyfYyBd4= +github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.32/go.mod h1:IitoQxGfaKdVLNg0hD8/DXmAqNy0H4K2H2Sf91ti8sI= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.2 h1:Pg9URiobXy85kgFev3og2CuOZ8JZUBENF+dcgWBaYNk= +github.com/aws/aws-sdk-go-v2/internal/ini v1.8.2/go.mod h1:FbtygfRFze9usAadmnGJNc8KsP346kEe+y2/oyhGAGc= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.203.0 h1:EDLBXOs5D0KUqDThg8ID63mK5E7lJ8pjHGBtix6O9j0= +github.com/aws/aws-sdk-go-v2/service/ec2 v1.203.0/go.mod h1:nSbxgPGhyI9j/cMVSHUEEtNQzEYeNOkbHnHNeTuQqt0= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.2 h1:D4oz8/CzT9bAEYtVhSBmFj2dNOtaHOtMKc2vHBwYizA= +github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.2/go.mod h1:Za3IHqTQ+yNcRHxu1OFucBh0ACZT4j4VQFF0BqpZcLY= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.13 h1:SYVGSFQHlchIcy6e7x12bsrxClCXSP5et8cqVhL8cuw= +github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.13/go.mod h1:kizuDaLX37bG5WZaoxGPQR/LNFXpxp0vsUnqfkWXfNE= +github.com/aws/aws-sdk-go-v2/service/pricing v1.32.16 h1:V6lgrFRz1B7+OE6NUMrccUBVSiSF0B4uwkldeWAGvnU= +github.com/aws/aws-sdk-go-v2/service/pricing v1.32.16/go.mod h1:27xFxqZ5sSWdgfXEM8ixtw0qApX2bjsHNiJMbHwNDhc= +github.com/aws/aws-sdk-go-v2/service/sso v1.24.15 h1:/eE3DogBjYlvlbhd2ssWyeuovWunHLxfgw3s/OJa4GQ= +github.com/aws/aws-sdk-go-v2/service/sso v1.24.15/go.mod h1:2PCJYpi7EKeA5SkStAmZlF6fi0uUABuhtF8ILHjGc3Y= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.14 h1:M/zwXiL2iXUrHputuXgmO94TVNmcenPHxgLXLutodKE= +github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.14/go.mod h1:RVwIw3y/IqxC2YEXSIkAzRDdEU1iRabDPaYjpGCbCGQ= +github.com/aws/aws-sdk-go-v2/service/sts v1.33.14 h1:TzeR06UCMUq+KA3bDkujxK1GVGy+G8qQN/QVYzGLkQE= +github.com/aws/aws-sdk-go-v2/service/sts v1.33.14/go.mod h1:dspXf/oYWGWo6DEvj98wpaTeqt5+DMidZD0A9BYTizc= +github.com/aws/smithy-go v1.22.2 h1:6D9hW43xKFrRx/tXXfAlIZc4JI+yQe6snnWcQyxSyLQ= +github.com/aws/smithy-go v1.22.2/go.mod h1:irrKGvNn1InZwb2d7fkIRNucdfwR8R+Ts3wxYa/cJHg= github.com/aymanbagabas/go-osc52/v2 v2.0.1 h1:HwpRHbFMcZLEVr42D4p7XBqjyuxQH5SMiErDT4WkJ2k= github.com/aymanbagabas/go-osc52/v2 v2.0.1/go.mod h1:uYgXzlJ7ZpABp8OJ+exZzJJhRNQ2ASbcXHWsFqH8hp8= github.com/blang/semver/v4 v4.0.0 h1:1PFHFE6yCCTv8C1TeyNNarDzntLi7wMI5i/pzqYIsAM= github.com/blang/semver/v4 v4.0.0/go.mod h1:IbckMUScFkM3pff0VJDNKRiT6TG/YpiHIM2yvyW5YoQ= github.com/charmbracelet/bubbles v0.20.0 h1:jSZu6qD8cRQ6k9OMfR1WlM+ruM8fkPWkHvQWD9LIutE= github.com/charmbracelet/bubbles v0.20.0/go.mod h1:39slydyswPy+uVOHZ5x/GjwVAFkCsV8IIVy+4MhzwwU= -github.com/charmbracelet/bubbletea v1.2.4 h1:KN8aCViA0eps9SCOThb2/XPIlea3ANJLUkv3KnQRNCE= -github.com/charmbracelet/bubbletea v1.2.4/go.mod h1:Qr6fVQw+wX7JkWWkVyXYk/ZUQ92a6XNekLXa3rR18MM= +github.com/charmbracelet/bubbletea v1.3.3 h1:WpU6fCY0J2vDWM3zfS3vIDi/ULq3SYphZhkAGGvmEUY= +github.com/charmbracelet/bubbletea v1.3.3/go.mod h1:dtcUCyCGEX3g9tosuYiut3MXgY/Jsv9nKVdibKKRRXo= github.com/charmbracelet/lipgloss v1.0.0 h1:O7VkGDvqEdGi93X+DeqsQ7PKHDgtQfF8j8/O2qFMQNg= github.com/charmbracelet/lipgloss v1.0.0/go.mod h1:U5fy9Z+C38obMs+T+tJqst9VGzlOYGj4ri9reL3qUlo= -github.com/charmbracelet/x/ansi v0.4.5 h1:LqK4vwBNaXw2AyGIICa5/29Sbdq58GbGdFngSexTdRM= -github.com/charmbracelet/x/ansi v0.4.5/go.mod h1:dk73KoMTT5AX5BsX0KrqhsTqAnhZZoCBjs7dGWp4Ktw= +github.com/charmbracelet/x/ansi v0.8.0 h1:9GTq3xq9caJW8ZrBTe0LIe2fvfLR/bYXKTx2llXn7xE= +github.com/charmbracelet/x/ansi v0.8.0/go.mod h1:wdYl/ONOLHLIVmQaxbIYEC/cRKOQyjTkowiI4blgS9Q= github.com/charmbracelet/x/term v0.2.1 h1:AQeHeLZ1OqSXhrAWpYUtZyX1T3zVxfpZuEQMIQaGIAQ= github.com/charmbracelet/x/term v0.2.1/go.mod h1:oQ4enTYFV7QN4m0i9mzHrViD7TQKvNEEkHUMCmsxdUg= github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= @@ -93,20 +93,21 @@ github.com/samber/lo v1.47.0 h1:z7RynLwP5nbyRscyvcD043DWYoOcYRv3mV8lBeqOCLc= github.com/samber/lo v1.47.0/go.mod h1:RmDH9Ct32Qy3gduHQuKJ3gW1fMHAnE/fAzQuf6He5cU= github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM= github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y= -github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= +github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o= +github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg= github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY= github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0= go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= -golang.org/x/sync v0.9.0 h1:fEo0HyrW1GIgZdpbhCRO0PkJajUS5H9IFUztCgEo2jQ= -golang.org/x/sync v0.9.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w= +golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20210809222454-d867a43fc93e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.27.0 h1:wBqf8DvsY9Y/2P8gAfPDEYNuS30J4lPHJxXSb/nJZ+s= -golang.org/x/sys v0.27.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4= -golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI= +golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc= +golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM= +golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/pkg/cli/flags.go b/pkg/cli/flags.go index 8aea97f..b9dedc4 100644 --- a/pkg/cli/flags.go +++ b/pkg/cli/flags.go @@ -386,7 +386,7 @@ func (cl *CommandLineInterface) StringOptionsFlagOnFlagSet(flagSet *pflag.FlagSe return nil } for _, v := range validOpts { - if v == *val.(*string) { + if strings.EqualFold(v, *val.(*string)) { return nil } } diff --git a/pkg/selector/comparators.go b/pkg/selector/comparators.go index 6b1852a..77cf8fc 100644 --- a/pkg/selector/comparators.go +++ b/pkg/selector/comparators.go @@ -29,7 +29,6 @@ const ( ) var ( - amdRegex = regexp.MustCompile(`[a-zA-Z0-9]+a\\.[a-zA-Z0-9]`) networkPerfRE = regexp.MustCompile(`[0-9]+ Gigabit`) generationRE = regexp.MustCompile(`[a-zA-Z]+([0-9]+)`) ) @@ -41,7 +40,7 @@ func isSupportedFromString(instanceTypeValue *string, target *string) bool { if instanceTypeValue == nil { return false } - return *instanceTypeValue == *target + return strings.EqualFold(*instanceTypeValue, *target) } func isSupportedFromStrings(instanceTypeValues []*string, target *string) bool { @@ -83,7 +82,7 @@ func isSupportedUsageClassType(instanceTypeValue []ec2types.UsageClassType, targ } for _, potentialType := range instanceTypeValue { - if potentialType == *target { + if strings.EqualFold(string(potentialType), string(*target)) { return true } } @@ -102,7 +101,7 @@ func isSupportedArchitectureType(instanceTypeValue []ec2types.ArchitectureType, } for _, potentialType := range instanceTypeValue { - if potentialType == *target { + if strings.EqualFold(string(potentialType), string(*target)) { return true } } @@ -120,7 +119,7 @@ func isSupportedVirtualizationType(instanceTypeValue []ec2types.VirtualizationTy return true } for _, potentialType := range instanceTypeValue { - if potentialType == *target { + if strings.EqualFold(string(potentialType), string(*target)) { return true } } @@ -134,7 +133,7 @@ func isSupportedInstanceTypeHypervisorType(instanceTypeValue ec2types.InstanceTy if reflect.ValueOf(*target).IsZero() { return true } - if instanceTypeValue == *target { + if strings.EqualFold(string(instanceTypeValue), string(*target)) { return true } return false @@ -151,7 +150,7 @@ func isSupportedRootDeviceType(instanceTypeValue []ec2types.RootDeviceType, targ return true } for _, potentialType := range instanceTypeValue { - if potentialType == *target { + if strings.EqualFold(string(potentialType), string(*target)) { return true } } @@ -165,7 +164,7 @@ func isMatchingCpuArchitecture(instanceTypeValue CPUManufacturer, target *CPUMan if reflect.ValueOf(*target).IsZero() { return true } - if instanceTypeValue == *target { + if strings.EqualFold(string(instanceTypeValue), string(*target)) { return true } return false @@ -376,19 +375,6 @@ func getEBSOptimizedBaselineIOPS(ebsInfo *ec2types.EbsInfo) *int32 { return ebsInfo.EbsOptimizedInfo.BaselineIops } -func getCPUManufacturer(instanceTypeInfo *ec2types.InstanceTypeInfo) CPUManufacturer { - for _, it := range instanceTypeInfo.ProcessorInfo.SupportedArchitectures { - if it == ec2types.ArchitectureTypeArm64 { - return CPUManufacturerAWS - } - } - - if amdRegex.Match([]byte(instanceTypeInfo.InstanceType)) { - return CPUManufacturerAMD - } - return CPUManufacturerIntel -} - // getInstanceTypeGeneration returns the generation from an instance type name // i.e. c7i.xlarge -> 7 // if any error occurs, 0 will be returned. diff --git a/pkg/selector/selector.go b/pkg/selector/selector.go index c7d933f..59ce705 100644 --- a/pkg/selector/selector.go +++ b/pkg/selector/selector.go @@ -303,11 +303,22 @@ func (s Selector) prepareFilter(ctx context.Context, filters Filters, instanceTy eneaSupport := string(instanceTypeInfo.NetworkInfo.EnaSupport) ebsOptimizedSupport := string(instanceTypeInfo.EbsInfo.EbsOptimizedSupport) + // If an empty slice is passed, treat the filter as nil + filterInstanceTypes := filters.InstanceTypes + if filterInstanceTypes != nil && len(*filterInstanceTypes) == 0 { + filterInstanceTypes = nil + } + + var cpuManufacturerFilter *string + if filters.CPUManufacturer != nil { + cpuManufacturerFilter = aws.String(string(*filters.CPUManufacturer)) + } + // filterToInstanceSpecMappingPairs is a map of filter name [key] to filter pair [value]. // A filter pair includes user input filter value and instance spec value retrieved from DescribeInstanceTypes filterToInstanceSpecMappingPairs := map[string]filterPair{ cpuArchitecture: {filters.CPUArchitecture, instanceTypeInfo.ProcessorInfo.SupportedArchitectures}, - cpuManufacturer: {filters.CPUManufacturer, getCPUManufacturer(&instanceTypeInfo.InstanceTypeInfo)}, + cpuManufacturer: {cpuManufacturerFilter, instanceTypeInfo.ProcessorInfo.Manufacturer}, usageClass: {filters.UsageClass, instanceTypeInfo.SupportedUsageClasses}, rootDeviceType: {filters.RootDeviceType, instanceTypeInfo.SupportedRootDeviceTypes}, hibernationSupported: {filters.HibernationSupported, instanceTypeInfo.HibernationSupported}, @@ -329,7 +340,7 @@ func (s Selector) prepareFilter(ctx context.Context, filters Filters, instanceTy networkPerformance: {filters.NetworkPerformance, getNetworkPerformance(instanceTypeInfo.NetworkInfo.NetworkPerformance)}, networkEncryption: {filters.NetworkEncryption, instanceTypeInfo.NetworkInfo.EncryptionInTransitSupported}, ipv6: {filters.IPv6, instanceTypeInfo.NetworkInfo.Ipv6Supported}, - instanceTypes: {filters.InstanceTypes, instanceTypeInfo.InstanceType}, + instanceTypes: {filterInstanceTypes, aws.String(string(instanceTypeInfo.InstanceType))}, virtualizationType: {filters.VirtualizationType, instanceTypeInfo.SupportedVirtualizationTypes}, pricePerHour: {filters.PricePerHour, &instanceTypeHourlyPriceForFilter}, instanceStorageRange: {filters.InstanceStorageRange, getInstanceStorage(instanceTypeInfo.InstanceStorageInfo)}, diff --git a/test/e2e/run-test b/test/e2e/run-test index 2320688..b5634e5 100755 --- a/test/e2e/run-test +++ b/test/e2e/run-test @@ -93,7 +93,7 @@ params=( ) echo "${expected[*]}" | execute_test "24 VCPUs" "${params[@]}" -expected=(g3.16xlarge g4ad.16xlarge g4dn.12xlarge g5.12xlarge g5.24xlarge g6.12xlarge g6.24xlarge g6e.12xlarge g6e.24xlarge p3.8xlarge) +expected=(g4ad.16xlarge g4dn.12xlarge g5.12xlarge g5.24xlarge g6.12xlarge g6.24xlarge g6e.12xlarge g6e.24xlarge p3.8xlarge) params=( "--gpus=4" "--gpus-min=4 --gpus-max=4" @@ -119,8 +119,10 @@ params=( echo "${expected[*]}" | execute_test "96 GiB gpu-memory-total" "${params[@]}" -expected=(a1.large c3.large c4.large c5.large c5a.large c5d.large c5n.large c6g.large c6gd.large \ - g4dn.2xlarge g4dn.4xlarge g4dn.xlarge i3.large i3en.large m1.large m3.large m5.large m5a.large m5ad.large m5d.large) +expected=(a1.large c3.large c4.large c5.large c5a.large c5ad.large c5d.large c5n.large c6a.large c6g.large c6gd.large \ + c6gn.large c6i.large c6id.large c6in.large c7a.large c7g.large c7gd.large c7gn.large c7i-flex.large c7i.large \ + c8g.large d3.8xlarge d3en.12xlarge g4ad.4xlarge g4dn.2xlarge g4dn.4xlarge g4dn.xlarge i3.large i3en.large i4g.large \ + i4i.large i7ie.large i8g.large im4gn.large is4gen.large m1.large m3.large m5.large m5a.large) params=( "--network-interfaces=3" "--network-interfaces-min=3 --network-interfaces-max=3"