Thanks for your response!
My question about the IP addresses was more in terms of the connection string that I need to use to connect to MongoDB from an application. According to the MongoDB documentation,
"For a replica set, specify the hostname(s) of the mongod instance(s) as listed in the replica set configuration."
So, is it fine if I just mention the primary public IP address while connecting to my instance? Isn't it necessary to ensure I mention the replica set instances as well?