Skip to content
This repository has been archived by the owner on Aug 16, 2022. It is now read-only.

fix: Explicitly Ignore EC2 Classic EIPs #1055

Merged
merged 6 commits into from
Jun 14, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion resources/services/ec2/eips.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package ec2
import (
"context"

"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/service/ec2"
"github.com/aws/aws-sdk-go-v2/service/ec2/types"
"github.com/cloudquery/cq-provider-aws/client"
Expand Down Expand Up @@ -121,7 +122,9 @@ func Ec2Eips() *schema.Table {
func fetchEc2Eips(ctx context.Context, meta schema.ClientMeta, parent *schema.Resource, res chan<- interface{}) error {
c := meta.(*client.Client)
svc := c.Services().EC2
output, err := svc.DescribeAddresses(ctx, &ec2.DescribeAddressesInput{}, func(options *ec2.Options) {
output, err := svc.DescribeAddresses(ctx, &ec2.DescribeAddressesInput{
Filters: []types.Filter{{Name: aws.String("domain"), Values: []string{"vpc"}}},
}, func(options *ec2.Options) {
options.Region = c.Region
})
if err != nil {
Expand Down