func findResourceVPCEndpoint(conn *ec2.EC2, id string) (*ec2.VpcEndpoint, error) { input := &ec2.DescribeVpcEndpointsInput{ VpcEndpointIds: aws.StringSlice([]string{id}), } log.Printf("[DEBUG] Reading VPC Endpoint: %q", id) output, err := conn.DescribeVpcEndpoints(input) if err != nil { return nil, err } return output.VpcEndpoints[0], nil }