code: func (b *Remote) discover(serviceID string) (*url.URL, *disco.Constraints, error) {
  	hostname, err := svchost.ForComparison(b.hostname)
  	if err != nil {
  		return nil, nil, err
  	}
  
  	host, err := b.services.Discover(hostname)
  	if err != nil {
  		return nil, nil, err
  	}
  
  	service, err := host.ServiceURL(serviceID)
  	// Return the error, unless its a disco.ErrVersionNotSupported error.
  	if _, ok := err.(*disco.ErrVersionNotSupported); !ok && err != nil {
  		return nil, nil, err
  	}
  
  	// We purposefully ignore the error and return the previous error, as
  	// checking for version constraints is considered optional.
  	constraints, _ := host.VersionConstraints(serviceID, "terraform")
  
  	return service, constraints, err
  }
docs: // discover the remote backend API service URL and version constraints.