func GetAllVpcPeers(svc *ec2.Client) []VpcPeering {
	var result []VpcPeering
	resp, err := svc.DescribeVpcPeeringConnections(context.TODO(), &ec2.DescribeVpcPeeringConnectionsInput{})
	if err != nil {
		panic(err)
	}
	for _, connection := range resp.VpcPeeringConnections {
		peering := VpcPeering{
			RequesterVpc: VPCHolder{ID: *connection.RequesterVpcInfo.VpcId,
				AccountID: *connection.RequesterVpcInfo.OwnerId},
			AccepterVpc: VPCHolder{ID: *connection.AccepterVpcInfo.VpcId,
				AccountID: *connection.AccepterVpcInfo.OwnerId},
			PeeringID: *connection.VpcPeeringConnectionId,
		}
		result = append(result, peering)
	}
	return result
}
// GetAllVpcPeers returns the peerings that are present in this region of this account
GetAllVpcPeers returns the peerings that are present in this region of this account
// GetAllVpcPeers returns the peerings that are present in this region of this account
func GetAllVpcPeers(svc *ec2.Client) []VpcPeering {
	var result []VpcPeering
	resp, err := svc.DescribeVpcPeeringConnections(context.TODO(), &ec2.DescribeVpcPeeringConnectionsInput{})
	if err != nil {
		panic(err)
	}
	for _, connection := range resp.VpcPeeringConnections {
		peering := VpcPeering{
			RequesterVpc: VPCHolder{ID: *connection.RequesterVpcInfo.VpcId,
				AccountID: *connection.RequesterVpcInfo.OwnerId},
			AccepterVpc: VPCHolder{ID: *connection.AccepterVpcInfo.VpcId,
				AccountID: *connection.AccepterVpcInfo.OwnerId},
			PeeringID: *connection.VpcPeeringConnectionId,
		}
		result = append(result, peering)
	}
	return result
}
func GetAllVpcPeers ( svc * ec2 . Client ) [ ] VpcPeering { var result [ ] VpcPeering resp , err := svc . DescribeVpcPeeringConnections ( context . TODO ( ) , & ec2 . DescribeVpcPeeringConnectionsInput { } ) if err != nil { panic ( err ) } for _ , connection := range resp . VpcPeeringConnections { peering := VpcPeering { RequesterVpc : VPCHolder { ID : * connection . RequesterVpcInfo . VpcId , AccountID : * connection . RequesterVpcInfo . OwnerId } , AccepterVpc : VPCHolder { ID : * connection . AccepterVpcInfo . VpcId , AccountID : * connection . AccepterVpcInfo . OwnerId } , PeeringID : * connection . VpcPeeringConnectionId , } result = append ( result , peering ) } return result }
GetAllVpcPeers returns the peerings that are present in this region of this account
GetAllVpcPeers returns the peerings that are present in this region of this account