I created a new Atlas cluster, named Cluster0, a new MongoDB user, and allowed connections from anywhere in the IP Whitelist section.
I am using compass.
In the connection configuration, I provide as hostname the name of my secondary replica:
I choose the authentication with Username and password:
Note that in the security section of the Atlas cluster, this user has the following role:
The connection to the cluster is successful, but once I try to create a new database, compass displays an error:
Single connection to server type: Secondary is not writable
Any help is appreciated