Watch Aspire live streamsDocsTry Aspire
Watch Aspire live streamsDocsTry

MongoDBTlsMode

Enumnet10.0
📦 Aspire.Hosting.MongoDB v13.6.0
Defines the TLS mode for MongoDB server.
namespace Aspire.Hosting;
public enum MongoDBTlsMode
See https://www.mongodb.com/docs/manual/reference/configuration-options/#mongodb-setting-net.tls.mode
AllowTls= 0
Connections between servers do not use TLS. For incoming connections, the server accepts both TLS and non-TLS.
PreferTls= 1
Connections between servers use TLS. For incoming connections, the server accepts both TLS and non-TLS.
RequireTls= 2
The server uses and accepts only TLS encrypted connections.