Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why doesn't aws_ec2_instance_type table support the account_id (and region) column? #2195

Closed
e-gineer opened this issue May 21, 2024 · 2 comments · Fixed by #2200
Closed
Assignees
Labels
bug Something isn't working

Comments

@e-gineer
Copy link
Contributor

It's hard to query instance types as a single list because this table does not allow you to filter to a single account. As a result you get many duplicates.

Also - do instance types vary by region? If so, should this table be querying by region?

@e-gineer e-gineer added the bug Something isn't working label May 21, 2024
@graza-io
Copy link
Contributor

In addition to the above, would be also useful to be able to filter by instance family m5a, m5, t3, etc - This would drastically increase performance.

@ParthaI
Copy link
Contributor

ParthaI commented May 27, 2024

@e-gineer / @graza-io, I've submitted a PR to address this issue. Here are the changes implemented:

  • We can now obtain results for each region.
  • It's possible to filter by instance type as demonstrated (select instance_type, region from aws_ec2_instance_type where instance_type = 'r6g.large').
  • The API does not support filtering by instance family. While specific instances like m6g.metal can be filtered, broader family filters like m6g are not supported. Reference: AWS API Documentation

Also - do instance types vary by region? If so, should this table be querying by region?

Yes, it varies from region to region.

> select count(*) from aws_ec2_instance_type where region = 'us-east-1'
+-------+
| count |
+-------+
| 776   |
+-------+

> select count(*) from aws_ec2_instance_type where region = 'ap-south-1'
+-------+
| count |
+-------+
| 518   |
+-------+

Please let me know if I have missed any other implementations.

Thank you!

misraved pushed a commit that referenced this issue Jun 3, 2024
…ue per region and filter results by instance_type Closes #2195 (#2200)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
3 participants