diff --git a/xos/tosca/resources/vsgwuvendor.py b/xos/tosca/resources/vsgwuvendor.py
new file mode 100644
index 0000000..4fffecf
--- /dev/null
+++ b/xos/tosca/resources/vsgwuvendor.py
@@ -0,0 +1,32 @@
+from xosresource import XOSResource
+from core.models import Tenant
+from services.vsgwu.models import VSGWUVendor
+
+class XOSVSGWUVendor(XOSResource):
+    provides = "tosca.nodes.VSGWUVendor"
+    xos_model = VSGWUVendor
+    name_field = None
+    copyin_props = ( "name",)
+
+    def get_xos_args(self, throw_exception=True):
+        args = super(XOSVSGWUVendor, self).get_xos_args()
+
+        tenant_name = self.get_requirement("tosca.relationships.VendorOfTenant", throw_exception=throw_exception)
+        if tenant_name:
+            args["provider_tenant"] = self.get_xos_object(Tenant, throw_exception=throw_exception, name=tenant_name)
+
+        return args
+
+    def get_existing_objs(self):
+        args = self.get_xos_args(throw_exception=False)
+        provider_tenant = args.get("provider", None)
+        if provider_tenant:
+            return [ self.get_xos_object(provider_tenant=provider_tenant) ]
+        return []
+
+    def postprocess(self, obj):
+        pass
+
+    def can_delete(self, obj):
+        return super(XOSVSGWUVendor, self).can_delete(obj)
+
