code: func (p *Provider) Validate(c *terraform.ResourceConfig) ([]string, []error) {
  	if err := p.InternalValidate(); err != nil {
  		return nil, []error{fmt.Errorf(
  			"Internal validation of the provider failed! This is always a bug\n"+
  				"with the provider itself, and not a user issue. Please report\n"+
  				"this bug:\n\n%s", err)}
  	}
  
  	return schemaMap(p.Schema).Validate(c)
  }
docs: // Validate implementation of terraform.ResourceProvider interface.