code: func (p ProviderInstance) Type() string {
  	t := string(p)
  	if dotPos := strings.Index(t, "."); dotPos != -1 {
  		t = t[:dotPos]
  	}
  	return t
  }
docs: // Type returns the provider type of this instance. For example, for an instance
  // named "aws.foo" the type is "aws".