aksio-insurtech / AppManager

MIT License
4 stars 2 forks source link

Look into possibly having database replication for MongoDB, site recovery purposes #24

Open einari opened 2 years ago

einari commented 2 years ago
using Pulumi;
using Mongodbatlas = Pulumi.Mongodbatlas;

class MyStack : Stack
{
    public MyStack()
    {
        var test = new Mongodbatlas.Cluster("test", new Mongodbatlas.ClusterArgs
        {
            AutoScalingDiskGbEnabled = true,
            CloudBackup = true,
            ClusterType = "REPLICASET",
            MongoDbMajorVersion = "4.2",
            ProjectId = "<YOUR-PROJECT-ID>",
            ProviderDiskTypeName = "P6",
            ProviderInstanceSizeName = "M30",
            ProviderName = "AZURE",
            ReplicationSpecs = 
            {
                new Mongodbatlas.Inputs.ClusterReplicationSpecArgs
                {
                    NumShards = 1,
                    RegionsConfigs = 
                    {
                        new Mongodbatlas.Inputs.ClusterReplicationSpecRegionsConfigArgs
                        {
                            ElectableNodes = 3,
                            Priority = 7,
                            ReadOnlyNodes = 0,
                            RegionName = "US_EAST",
                        },
                    },
                },
            },
        });
    }

}