code: func (f *StateFilter) Filter(fs ...string) ([]*StateFilterResult, error) {
  	// Parse all the addresses
  	as := make([]*ResourceAddress, len(fs))
  	for i, v := range fs {
  		a, err := ParseResourceAddress(v)
  		if err != nil {
  			return nil, fmt.Errorf("Error parsing address '%s': %s", v, err)
  		}
  
  		as[i] = a
  	}
  
  	// If we weren't given any filters, then we list all
  	if len(fs) == 0 {
  		as = append(as, &ResourceAddress{Index: -1})
  	}
  
  	// Filter each of the address. We keep track of this in a map to
  	// strip duplicates.
  	resultSet := make(map[string]*StateFilterResult)
  	for _, a := range as {
  		for _, r := range f.filterSingle(a) {
  			resultSet[r.String()] = r
  		}
  	}
  
  	// Make the result list
  	results := make([]*StateFilterResult, 0, len(resultSet))
  	for _, v := range resultSet {
  		results = append(results, v)
  	}
  
  	// Sort them and return
  	sort.Sort(StateFilterResultSlice(results))
  	return results, nil
  }
docs: // Filter takes the addresses specified by fs and finds all the matches.
  // The values of fs are resource addressing syntax that can be parsed by
  // ParseResourceAddress.