Wash and chop the tomatoes in small pieces, keep the chopped tomatoes aside.
Wash the rice very well and keep this aside separately from the tomatoes.
Add the oil to the inner pot of instant pot, press the saute function, set it low and add the oil.
When the oil is hot, add the whole spices - cardamom pods, cloves, cinnamon sticks, bay leaves and star anise and lightly fry for about 1 minute.
Once the spices are lightly fried, add the ginger garlic paste and green chilies, stir well and fry for about a minute.
Add the chopped tomatoes also to the pot and saute for another 1 to 2 minutes. (Once the tomatoes are sauteed, in case the pot gets very hot and things start sticking, you can always press the 'keep warm' button which will immediately cancels the saute function so you do not have to worry)
Add the rice also to the pot, stir well using a good spatula and saute for another 1 minute (if needed you may add a little more oil or butter or ghee).
Add enough salt and also all the remaining spices to the pot - turmeric powder, red chili powder and cumin seeds powder, stir well and saute for about a minute (you may also add a little coriander powder and garam masala powder if you wish to have more masala flavor for the rice, but this is not necessary).
Add the water, stir everything well and press the 'keep warm/cancel' button.
Close the instant pot with lid in sealing position, press the manual button and cook in high pressure for 5 minutes of time.
Once the cooking is done for five minutes (which probably will start after a few minutes of time as the instant pot needs to build up enough pressure and so you have to wait until its ready), the instant pot will beep and you can press the 'keep warm' button. Wait for another few minutes until the pressure is naturally released or you may do a careful manual release after an NPR (natural pressure release) of about 15 minutes.
Once the pressure is all released, you can carefully open the lid by turning the lid to venting position.
Stir the prepared rice using a good quality spatula and top with cilantro leaves if you wish. Serve the delicious tomato rice with any curry, side dishes, fresh yogurt or raitha as you like.