Am I obliged to tell students that there are different versions of the exam?
Making different versions of the exam is standard practice in a lot universities when physical barriers against cheating are not available, when students take the test in different moments or with take away exams or homework.
Provided that difference of versions is not noticeable at first sight, not telling the students in advance won't harm honest students, but it will make dishonest students to unsuccessfully cheat in a way that will be easily noticeable - probably some students will produce the answer to their neighbours'questions. Therefore, I don't see an ethical problem in not telling them.
In the end it depends on what is your goal: If you want to catch dishonest students cheating, don't tell them, but if you prefer discouraging dishonest students from trying to cheat, tell them. When faced with that dilemma I usually choose the later.
Of course, by telling them you will give cheaters some useful information on how to cheat, but that should be addressed in another way.
At some point you need to tell the students. You do not want students leaving the exam and then talking about the answers and being totally confused. For example, it is not uncommon to hear a student ask after an exam, did you get 1 kg for problem 2. If the problems are different, this is going to make the discussions confusing and prevent the students from learning after the exam. Telling them on the way out of the exam room is often not feasible, so telling them in advance is probably better.
I would also suggest instead of slightly changing the questions, is probably not the best idea. It can lead to complaints that one exam was easier/harder than another. Further, if you provide solutions, it is much more difficult since you need to pair the solution to the exact problem. An alternative for reducing cheating is to mix up the order of the questions such that one student might get 1-2-3-4-5 and another gets 5-4-3-2-1. Then students can talk about the "train problem" and the "coin flipping problem" and not question 1 or question 2.
A trick I have seen used, and plan to put in practise where suitable, is to make students use (parts of) a unique identifying number as the initial factor or exponent in the question.
For example, universities often have nine-digit student numbers which are ideal for being encoded in a computer science or mathematics question, especially where it is knowledge of a process or algorithm being tested, or the answers can be easily formulated from just the number provided the techniques applied are correct and accurate.
This allows students to study or even work together on an assignment/test, speaking generally about techniques and concepts that are relevant, without being able to directly share answers unless they do all the work together - in which case you have explicit collusion. In my experience this is a lot easier to find and a lot easier to penalise - because you can never quite judge whether Student A was exposing answers or Student B was copying without their knowledge, or that they had a system going, if they simply present the same answers from the same question.