code: func (r Resource) DefaultProviderConfig() ProviderConfig {
  	typeName := r.Type
  	if under := strings.Index(typeName, "_"); under != -1 {
  		typeName = typeName[:under]
  	}
  	return ProviderConfig{
  		Type: typeName,
  	}
  }
docs: // DefaultProviderConfig returns the address of the provider configuration
  // that should be used for the resource identified by the reciever if it
  // does not have a provider configuration address explicitly set in
  // configuration.
  //
  // This method is not able to verify that such a configuration exists, nor
  // represent the behavior of automatically inheriting certain provider
  // configurations from parent modules. It just does a static analysis of the
  // receiving address and returns an address to start from, relative to the
  // same module that contains the resource.