Skip to content

Commit

Permalink
Added column vpc_endpoint_type in table aws_vpc_endpoint Closes #2001 (
Browse files Browse the repository at this point in the history
…#2003)

Co-authored-by: Madhushree Ray <[email protected]>
  • Loading branch information
ParthaI and madhushreeray30 authored Dec 7, 2023
1 parent 048a653 commit d9d23d3
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 4 deletions.
5 changes: 5 additions & 0 deletions aws/table_aws_vpc_endpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@ func tableAwsVpcEndpoint(_ context.Context) *plugin.Table {
Description: "The ID of the VPC to which the endpoint is associated.",
Type: proto.ColumnType_STRING,
},
{
Name: "vpc_endpoint_type",
Description: "The type of endpoint.",
Type: proto.ColumnType_STRING,
},
{
Name: "state",
Description: "The state of the VPC endpoint.",
Expand Down
30 changes: 26 additions & 4 deletions docs/tables/aws_vpc_endpoint.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ from
aws_vpc_endpoint;
```


### Subnet Id count for each VPC endpoints

```sql
Expand All @@ -26,7 +25,6 @@ from
aws_vpc_endpoint;
```


### Network details for each VPC endpoint

```sql
Expand All @@ -42,7 +40,6 @@ from
cross join jsonb_array_elements(groups) as sg;
```


### DNS information for the VPC endpoints

```sql
Expand All @@ -56,7 +53,6 @@ from
cross join jsonb_array_elements(dns_entries) as dns;
```


### VPC endpoint count by VPC ID

```sql
Expand All @@ -67,4 +63,30 @@ from
aws_vpc_endpoint
group by
vpc_id;
```

### Count endpoints by endpoint type

```sql
select
vpc_endpoint_type,
count(vpc_endpoint_id)
from
aws_vpc_endpoint
group by
vpc_endpoint_type;
```

### List 'interface' type VPC Endpoints

```sql
select
vpc_endpoint_id,
service_name,
vpc_id,
vpc_endpoint_type
from
aws_vpc_endpoint
where
vpc_endpoint_type = 'Interface';
```

0 comments on commit d9d23d3

Please sign in to comment.