added logic so that the dns provider is chosen based on the available credential data in the service_endpoints data bag