code: func (f *StateFilter) relevant(addr *ResourceAddress, raw interface{}) bool {
  	switch v := raw.(type) {
  	case *ModuleState:
  		path := v.Path[1:]
  
  		if len(addr.Path) > len(path) {
  			// Longer path in address means there is no way we match.
  			return false
  		}
  
  		// Check for a prefix match
  		for i, p := range addr.Path {
  			if path[i] != p {
  				// Any mismatches don't match.
  				return false
  			}
  		}
  
  		return true
  	case *ResourceState:
  		if addr.Type == "" {
  			// If we have no resource type, then we're interested in all!
  			return true
  		}
  
  		// If the type doesn't match we fail immediately
  		if v.Type != addr.Type {
  			return false
  		}
  
  		return true
  	default:
  		// If we don't know about it, let's just say no
  		return false
  	}
  }
docs: // relevant checks for relevance of this address against the given value.