Skip to content

Add aws_ec2_placement_group table #2491

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

Merged
merged 4 commits into from
May 21, 2025
Merged

Conversation

cbruno10
Copy link
Contributor

@cbruno10 cbruno10 commented May 8, 2025

Example query results

Results
### List all placement groups and their strategies

```sql
select
  group_name,
  strategy,
  state,
  region
from
  aws_ec2_placement_group;
group_name strategy state region
test-steampipe-pg partition available us-east-1

List all available partition placement groups

select
  group_name,
  partition_count,
  state
from
  aws_ec2_placement_group
where
  strategy = 'partition'
  and state = 'available';
group_name partition_count state
test-steampipe-pg 3 available

Count of placement groups by strategy

select
  strategy,
  count(*) as count
from
  aws_ec2_placement_group
group by
  strategy;
strategy count
partition 1

List placement groups with fewer than 3 partitions

select
  group_name,
  partition_count,
  strategy
from
  aws_ec2_placement_group
where
  partition_count < 3;

No rows returned (all partition_count values are 3 or greater).


List all partition placement groups and their partition counts

select
  group_name,
  partition_count,
  state
from
  aws_ec2_placement_group
where
  strategy = 'partition';
group_name partition_count state
test-steampipe-pg 3 available

</details>

@cbruno10 cbruno10 requested a review from Copilot May 8, 2025 19:23
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces the aws_ec2_placement_group table to allow users to query AWS EC2 Placement Groups using SQL. Key changes include:

  • Adding documentation with examples in docs/tables/aws_ec2_placement_group.md.
  • Implementing the table definition and query functions in aws/table_aws_ec2_placement_group.go.
  • Registering the new table in aws/plugin.go.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
docs/tables/aws_ec2_placement_group.md New documentation file with usage details and SQL examples.
aws/table_aws_ec2_placement_group.go New table implementation with list and get functions.
aws/plugin.go Updated table registrations to include the new placement group.

@cbruno10 cbruno10 requested a review from ParthaI May 8, 2025 19:27
ParthaI added 2 commits May 21, 2025 14:19
…he legacy V! package reference, renamed the column group_arn to arn
@misraved misraved merged commit bbd70ea into main May 21, 2025
1 check passed
@misraved misraved deleted the add-ec2-placement-group-table branch May 21, 2025 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants