if '' returns true but you seem to assume false, therefore using !empty($var) is the better approach
$consul_template::user/$consul_template::group are not defined since the exported resources have been removed and manage_user/manage_group have been introduced. Using them instead.