func IsMissingReference(err error) bool {
	_, ok := err.(interface {
		MissingReference() bool
	})
	return ok
}
IsMissingReference returns true if an error indicates that a managed
resource is missing a required reference..
package resource
import (
	"context"
	"os"
	"github.com/spf13/afero"
	corev1 "k8s.io/api/core/v1"
	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
	"k8s.io/apimachinery/pkg/runtime"
	"k8s.io/apimachinery/pkg/types"
	"sigs.k8s.io/controller-runtime/pkg/client"
	xpv1 "github.com/crossplane/crossplane-runtime/apis/common/v1"
	"github.com/crossplane/crossplane-runtime/pkg/errors"
	"github.com/crossplane/crossplane-runtime/pkg/meta"
)
const (
	errExtractEnv            = "cannot extract from environment variable when none specified"
	errExtractFs             = "cannot extract from filesystem when no path specified"
	errExtractSecretKey      = "cannot extract from secret key when none specified"
	errGetCredentialsSecret  = "cannot get credentials secret"
	errNoHandlerForSourceFmt = "no extraction handler registered for source: %s"
	errMissingPCRef          = "managed resource does not reference a ProviderConfig"
	errApplyPCU              = "cannot apply ProviderConfigUsage"
)
type errMissingRef struct{ error }
func (m errMissingRef) MissingReference() bool { return true }