fixed security_group issue and added support for specifying them by resource_uid