Yandex

v0.10.0 published on Thursday, Nov 18, 2021 by Pulumi

MdbMongodbCluster

Manages a MongoDB cluster within the Yandex.Cloud. For more information, see the official documentation.

Example Usage

using Pulumi;
using Yandex = Pulumi.Yandex;

class MyStack : Stack
{
    public MyStack()
    {
        var fooVpcNetwork = new Yandex.VpcNetwork("fooVpcNetwork", new Yandex.VpcNetworkArgs
        {
        });
        var fooVpcSubnet = new Yandex.VpcSubnet("fooVpcSubnet", new Yandex.VpcSubnetArgs
        {
            NetworkId = fooVpcNetwork.Id,
            V4CidrBlocks = 
            {
                "10.1.0.0/24",
            },
            Zone = "ru-central1-a",
        });
        var fooMdbMongodbCluster = new Yandex.MdbMongodbCluster("fooMdbMongodbCluster", new Yandex.MdbMongodbClusterArgs
        {
            ClusterConfig = new Yandex.Inputs.MdbMongodbClusterClusterConfigArgs
            {
                Version = "4.2",
            },
            Databases = 
            {
                new Yandex.Inputs.MdbMongodbClusterDatabaseArgs
                {
                    Name = "testdb",
                },
            },
            Environment = "PRESTABLE",
            Hosts = 
            {
                new Yandex.Inputs.MdbMongodbClusterHostArgs
                {
                    SubnetId = fooVpcSubnet.Id,
                    ZoneId = "ru-central1-a",
                },
            },
            Labels = 
            {
                { "test_key", "test_value" },
            },
            MaintenanceWindow = new Yandex.Inputs.MdbMongodbClusterMaintenanceWindowArgs
            {
                Type = "ANYTIME",
            },
            NetworkId = fooVpcNetwork.Id,
            Resources = new Yandex.Inputs.MdbMongodbClusterResourcesArgs
            {
                DiskSize = 16,
                DiskTypeId = "network-hdd",
                ResourcePresetId = "b1.nano",
            },
            Users = 
            {
                new Yandex.Inputs.MdbMongodbClusterUserArgs
                {
                    Name = "john",
                    Password = "password",
                    Permissions = 
                    {
                        new Yandex.Inputs.MdbMongodbClusterUserPermissionArgs
                        {
                            DatabaseName = "testdb",
                        },
                    },
                },
            },
        });
    }

}
package main

import (
	"github.com/pulumi/pulumi-yandex/sdk/go/yandex"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		fooVpcNetwork, err := yandex.NewVpcNetwork(ctx, "fooVpcNetwork", nil)
		if err != nil {
			return err
		}
		fooVpcSubnet, err := yandex.NewVpcSubnet(ctx, "fooVpcSubnet", &yandex.VpcSubnetArgs{
			NetworkId: fooVpcNetwork.ID(),
			V4CidrBlocks: pulumi.StringArray{
				pulumi.String("10.1.0.0/24"),
			},
			Zone: pulumi.String("ru-central1-a"),
		})
		if err != nil {
			return err
		}
		_, err = yandex.NewMdbMongodbCluster(ctx, "fooMdbMongodbCluster", &yandex.MdbMongodbClusterArgs{
			ClusterConfig: &MdbMongodbClusterClusterConfigArgs{
				Version: pulumi.String("4.2"),
			},
			Databases: MdbMongodbClusterDatabaseArray{
				&MdbMongodbClusterDatabaseArgs{
					Name: pulumi.String("testdb"),
				},
			},
			Environment: pulumi.String("PRESTABLE"),
			Hosts: MdbMongodbClusterHostArray{
				&MdbMongodbClusterHostArgs{
					SubnetId: fooVpcSubnet.ID(),
					ZoneId:   pulumi.String("ru-central1-a"),
				},
			},
			Labels: pulumi.StringMap{
				"test_key": pulumi.String("test_value"),
			},
			MaintenanceWindow: &MdbMongodbClusterMaintenanceWindowArgs{
				Type: pulumi.String("ANYTIME"),
			},
			NetworkId: fooVpcNetwork.ID(),
			Resources: &MdbMongodbClusterResourcesArgs{
				DiskSize:         pulumi.Int(16),
				DiskTypeId:       pulumi.String("network-hdd"),
				ResourcePresetId: pulumi.String("b1.nano"),
			},
			Users: MdbMongodbClusterUserArray{
				&MdbMongodbClusterUserArgs{
					Name:     pulumi.String("john"),
					Password: pulumi.String("password"),
					Permissions: MdbMongodbClusterUserPermissionArray{
						&MdbMongodbClusterUserPermissionArgs{
							DatabaseName: pulumi.String("testdb"),
						},
					},
				},
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
import pulumi
import pulumi_yandex as yandex

foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")
foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",
    network_id=foo_vpc_network.id,
    v4_cidr_blocks=["10.1.0.0/24"],
    zone="ru-central1-a")
foo_mdb_mongodb_cluster = yandex.MdbMongodbCluster("fooMdbMongodbCluster",
    cluster_config=yandex.MdbMongodbClusterClusterConfigArgs(
        version="4.2",
    ),
    databases=[yandex.MdbMongodbClusterDatabaseArgs(
        name="testdb",
    )],
    environment="PRESTABLE",
    hosts=[yandex.MdbMongodbClusterHostArgs(
        subnet_id=foo_vpc_subnet.id,
        zone_id="ru-central1-a",
    )],
    labels={
        "test_key": "test_value",
    },
    maintenance_window=yandex.MdbMongodbClusterMaintenanceWindowArgs(
        type="ANYTIME",
    ),
    network_id=foo_vpc_network.id,
    resources=yandex.MdbMongodbClusterResourcesArgs(
        disk_size=16,
        disk_type_id="network-hdd",
        resource_preset_id="b1.nano",
    ),
    users=[yandex.MdbMongodbClusterUserArgs(
        name="john",
        password="password",
        permissions=[yandex.MdbMongodbClusterUserPermissionArgs(
            database_name="testdb",
        )],
    )])
import * as pulumi from "@pulumi/pulumi";
import * as yandex from "@pulumi/yandex";

const fooVpcNetwork = new yandex.VpcNetwork("foo", {});
const fooVpcSubnet = new yandex.VpcSubnet("foo", {
    networkId: fooVpcNetwork.id,
    v4CidrBlocks: ["10.1.0.0/24"],
    zone: "ru-central1-a",
});
const fooMdbMongodbCluster = new yandex.MdbMongodbCluster("foo", {
    clusterConfig: {
        version: "4.2",
    },
    databases: [{
        name: "testdb",
    }],
    environment: "PRESTABLE",
    hosts: [{
        subnetId: fooVpcSubnet.id,
        zoneId: "ru-central1-a",
    }],
    labels: {
        test_key: "test_value",
    },
    maintenanceWindow: {
        type: "ANYTIME",
    },
    networkId: fooVpcNetwork.id,
    resources: {
        diskSize: 16,
        diskTypeId: "network-hdd",
        resourcePresetId: "b1.nano",
    },
    users: [{
        name: "john",
        password: "password",
        permissions: [{
            databaseName: "testdb",
        }],
    }],
});

Create a MdbMongodbCluster Resource

new MdbMongodbCluster(name: string, args: MdbMongodbClusterArgs, opts?: CustomResourceOptions);
@overload
def MdbMongodbCluster(resource_name: str,
                      opts: Optional[ResourceOptions] = None,
                      cluster_config: Optional[MdbMongodbClusterClusterConfigArgs] = None,
                      cluster_id: Optional[str] = None,
                      databases: Optional[Sequence[MdbMongodbClusterDatabaseArgs]] = None,
                      deletion_protection: Optional[bool] = None,
                      description: Optional[str] = None,
                      environment: Optional[str] = None,
                      folder_id: Optional[str] = None,
                      hosts: Optional[Sequence[MdbMongodbClusterHostArgs]] = None,
                      labels: Optional[Mapping[str, str]] = None,
                      maintenance_window: Optional[MdbMongodbClusterMaintenanceWindowArgs] = None,
                      name: Optional[str] = None,
                      network_id: Optional[str] = None,
                      resources: Optional[MdbMongodbClusterResourcesArgs] = None,
                      security_group_ids: Optional[Sequence[str]] = None,
                      users: Optional[Sequence[MdbMongodbClusterUserArgs]] = None)
@overload
def MdbMongodbCluster(resource_name: str,
                      args: MdbMongodbClusterArgs,
                      opts: Optional[ResourceOptions] = None)
func NewMdbMongodbCluster(ctx *Context, name string, args MdbMongodbClusterArgs, opts ...ResourceOption) (*MdbMongodbCluster, error)
public MdbMongodbCluster(string name, MdbMongodbClusterArgs args, CustomResourceOptions? opts = null)
name string
The unique name of the resource.
args MdbMongodbClusterArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args MdbMongodbClusterArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args MdbMongodbClusterArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args MdbMongodbClusterArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

MdbMongodbCluster Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The MdbMongodbCluster resource accepts the following input properties:

ClusterConfig MdbMongodbClusterClusterConfigArgs
Configuration of the MongoDB subcluster. The structure is documented below.
Databases List<MdbMongodbClusterDatabaseArgs>
A database of the MongoDB cluster. The structure is documented below.
Environment string
Deployment environment of the MongoDB cluster. Can be either PRESTABLE or PRODUCTION.
Hosts List<MdbMongodbClusterHostArgs>
A host of the MongoDB cluster. The structure is documented below.
NetworkId string
ID of the network, to which the MongoDB cluster belongs.
Resources MdbMongodbClusterResourcesArgs
Resources allocated to hosts of the MongoDB cluster. The structure is documented below.
Users List<MdbMongodbClusterUserArgs>
A user of the MongoDB cluster. The structure is documented below.
ClusterId string
The ID of the cluster.
DeletionProtection bool
Inhibits deletion of the cluster. Can be either true or false.


Description string
Description of the MongoDB cluster.
FolderId string
The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
Labels Dictionary<string, string>
A set of key/value label pairs to assign to the MongoDB cluster.
MaintenanceWindow MdbMongodbClusterMaintenanceWindowArgs
Name string
The fully qualified domain name of the host. Computed on server side.
SecurityGroupIds List<string>
A set of ids of security groups assigned to hosts of the cluster.
ClusterConfig MdbMongodbClusterClusterConfigArgs
Configuration of the MongoDB subcluster. The structure is documented below.
Databases []MdbMongodbClusterDatabaseArgs
A database of the MongoDB cluster. The structure is documented below.
Environment string
Deployment environment of the MongoDB cluster. Can be either PRESTABLE or PRODUCTION.
Hosts []MdbMongodbClusterHostArgs
A host of the MongoDB cluster. The structure is documented below.
NetworkId string
ID of the network, to which the MongoDB cluster belongs.
Resources MdbMongodbClusterResourcesArgs
Resources allocated to hosts of the MongoDB cluster. The structure is documented below.
Users []MdbMongodbClusterUserArgs
A user of the MongoDB cluster. The structure is documented below.
ClusterId string
The ID of the cluster.
DeletionProtection bool
Inhibits deletion of the cluster. Can be either true or false.


Description string
Description of the MongoDB cluster.
FolderId string
The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
Labels map[string]string
A set of key/value label pairs to assign to the MongoDB cluster.
MaintenanceWindow MdbMongodbClusterMaintenanceWindowArgs
Name string
The fully qualified domain name of the host. Computed on server side.
SecurityGroupIds []string
A set of ids of security groups assigned to hosts of the cluster.
clusterConfig MdbMongodbClusterClusterConfigArgs
Configuration of the MongoDB subcluster. The structure is documented below.
databases MdbMongodbClusterDatabaseArgs[]
A database of the MongoDB cluster. The structure is documented below.
environment string
Deployment environment of the MongoDB cluster. Can be either PRESTABLE or PRODUCTION.
hosts MdbMongodbClusterHostArgs[]
A host of the MongoDB cluster. The structure is documented below.
networkId string
ID of the network, to which the MongoDB cluster belongs.
resources MdbMongodbClusterResourcesArgs
Resources allocated to hosts of the MongoDB cluster. The structure is documented below.
users MdbMongodbClusterUserArgs[]
A user of the MongoDB cluster. The structure is documented below.
clusterId string
The ID of the cluster.
deletionProtection boolean
Inhibits deletion of the cluster. Can be either true or false.


description string
Description of the MongoDB cluster.
folderId string
The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
labels {[key: string]: string}
A set of key/value label pairs to assign to the MongoDB cluster.
maintenanceWindow MdbMongodbClusterMaintenanceWindowArgs
name string
The fully qualified domain name of the host. Computed on server side.
securityGroupIds string[]
A set of ids of security groups assigned to hosts of the cluster.
cluster_config MdbMongodbClusterClusterConfigArgs
Configuration of the MongoDB subcluster. The structure is documented below.
databases Sequence[MdbMongodbClusterDatabaseArgs]
A database of the MongoDB cluster. The structure is documented below.
environment str
Deployment environment of the MongoDB cluster. Can be either PRESTABLE or PRODUCTION.
hosts Sequence[MdbMongodbClusterHostArgs]
A host of the MongoDB cluster. The structure is documented below.
network_id str
ID of the network, to which the MongoDB cluster belongs.
resources MdbMongodbClusterResourcesArgs
Resources allocated to hosts of the MongoDB cluster. The structure is documented below.
users Sequence[MdbMongodbClusterUserArgs]
A user of the MongoDB cluster. The structure is documented below.
cluster_id str
The ID of the cluster.
deletion_protection bool
Inhibits deletion of the cluster. Can be either true or false.


description str
Description of the MongoDB cluster.
folder_id str
The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
labels Mapping[str, str]
A set of key/value label pairs to assign to the MongoDB cluster.
maintenance_window MdbMongodbClusterMaintenanceWindowArgs
name str
The fully qualified domain name of the host. Computed on server side.
security_group_ids Sequence[str]
A set of ids of security groups assigned to hosts of the cluster.

Outputs

All input properties are implicitly available as output properties. Additionally, the MdbMongodbCluster resource produces the following output properties:

CreatedAt string
Creation timestamp of the key.
Health string
The health of the host.
Id string
The provider-assigned unique ID for this managed resource.
Sharded bool
MongoDB Cluster mode enabled/disabled.
Status string
Status of the cluster. Can be either CREATING, STARTING, RUNNING, UPDATING, STOPPING, STOPPED, ERROR or STATUS_UNKNOWN. For more information see status field of JSON representation in the official documentation.
CreatedAt string
Creation timestamp of the key.
Health string
The health of the host.
Id string
The provider-assigned unique ID for this managed resource.
Sharded bool
MongoDB Cluster mode enabled/disabled.
Status string
Status of the cluster. Can be either CREATING, STARTING, RUNNING, UPDATING, STOPPING, STOPPED, ERROR or STATUS_UNKNOWN. For more information see status field of JSON representation in the official documentation.
createdAt string
Creation timestamp of the key.
health string
The health of the host.
id string
The provider-assigned unique ID for this managed resource.
sharded boolean
MongoDB Cluster mode enabled/disabled.
status string
Status of the cluster. Can be either CREATING, STARTING, RUNNING, UPDATING, STOPPING, STOPPED, ERROR or STATUS_UNKNOWN. For more information see status field of JSON representation in the official documentation.
created_at str
Creation timestamp of the key.
health str
The health of the host.
id str
The provider-assigned unique ID for this managed resource.
sharded bool
MongoDB Cluster mode enabled/disabled.
status str
Status of the cluster. Can be either CREATING, STARTING, RUNNING, UPDATING, STOPPING, STOPPED, ERROR or STATUS_UNKNOWN. For more information see status field of JSON representation in the official documentation.

Look up an Existing MdbMongodbCluster Resource

Get an existing MdbMongodbCluster resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: MdbMongodbClusterState, opts?: CustomResourceOptions): MdbMongodbCluster
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        cluster_config: Optional[MdbMongodbClusterClusterConfigArgs] = None,
        cluster_id: Optional[str] = None,
        created_at: Optional[str] = None,
        databases: Optional[Sequence[MdbMongodbClusterDatabaseArgs]] = None,
        deletion_protection: Optional[bool] = None,
        description: Optional[str] = None,
        environment: Optional[str] = None,
        folder_id: Optional[str] = None,
        health: Optional[str] = None,
        hosts: Optional[Sequence[MdbMongodbClusterHostArgs]] = None,
        labels: Optional[Mapping[str, str]] = None,
        maintenance_window: Optional[MdbMongodbClusterMaintenanceWindowArgs] = None,
        name: Optional[str] = None,
        network_id: Optional[str] = None,
        resources: Optional[MdbMongodbClusterResourcesArgs] = None,
        security_group_ids: Optional[Sequence[str]] = None,
        sharded: Optional[bool] = None,
        status: Optional[str] = None,
        users: Optional[Sequence[MdbMongodbClusterUserArgs]] = None) -> MdbMongodbCluster
func GetMdbMongodbCluster(ctx *Context, name string, id IDInput, state *MdbMongodbClusterState, opts ...ResourceOption) (*MdbMongodbCluster, error)
public static MdbMongodbCluster Get(string name, Input<string> id, MdbMongodbClusterState? state, CustomResourceOptions? opts = null)
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.

The following state arguments are supported:

ClusterConfig MdbMongodbClusterClusterConfigArgs
Configuration of the MongoDB subcluster. The structure is documented below.
ClusterId string
The ID of the cluster.
CreatedAt string
Creation timestamp of the key.
Databases List<MdbMongodbClusterDatabaseArgs>
A database of the MongoDB cluster. The structure is documented below.
DeletionProtection bool
Inhibits deletion of the cluster. Can be either true or false.


Description string
Description of the MongoDB cluster.
Environment string
Deployment environment of the MongoDB cluster. Can be either PRESTABLE or PRODUCTION.
FolderId string
The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
Health string
The health of the host.
Hosts List<MdbMongodbClusterHostArgs>
A host of the MongoDB cluster. The structure is documented below.
Labels Dictionary<string, string>
A set of key/value label pairs to assign to the MongoDB cluster.
MaintenanceWindow MdbMongodbClusterMaintenanceWindowArgs
Name string
The fully qualified domain name of the host. Computed on server side.
NetworkId string
ID of the network, to which the MongoDB cluster belongs.
Resources MdbMongodbClusterResourcesArgs
Resources allocated to hosts of the MongoDB cluster. The structure is documented below.
SecurityGroupIds List<string>
A set of ids of security groups assigned to hosts of the cluster.
Sharded bool
MongoDB Cluster mode enabled/disabled.
Status string
Status of the cluster. Can be either CREATING, STARTING, RUNNING, UPDATING, STOPPING, STOPPED, ERROR or STATUS_UNKNOWN. For more information see status field of JSON representation in the official documentation.
Users List<MdbMongodbClusterUserArgs>
A user of the MongoDB cluster. The structure is documented below.
ClusterConfig MdbMongodbClusterClusterConfigArgs
Configuration of the MongoDB subcluster. The structure is documented below.
ClusterId string
The ID of the cluster.
CreatedAt string
Creation timestamp of the key.
Databases []MdbMongodbClusterDatabaseArgs
A database of the MongoDB cluster. The structure is documented below.
DeletionProtection bool
Inhibits deletion of the cluster. Can be either true or false.


Description string
Description of the MongoDB cluster.
Environment string
Deployment environment of the MongoDB cluster. Can be either PRESTABLE or PRODUCTION.
FolderId string
The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
Health string
The health of the host.
Hosts []MdbMongodbClusterHostArgs
A host of the MongoDB cluster. The structure is documented below.
Labels map[string]string
A set of key/value label pairs to assign to the MongoDB cluster.
MaintenanceWindow MdbMongodbClusterMaintenanceWindowArgs
Name string
The fully qualified domain name of the host. Computed on server side.
NetworkId string
ID of the network, to which the MongoDB cluster belongs.
Resources MdbMongodbClusterResourcesArgs
Resources allocated to hosts of the MongoDB cluster. The structure is documented below.
SecurityGroupIds []string
A set of ids of security groups assigned to hosts of the cluster.
Sharded bool
MongoDB Cluster mode enabled/disabled.
Status string
Status of the cluster. Can be either CREATING, STARTING, RUNNING, UPDATING, STOPPING, STOPPED, ERROR or STATUS_UNKNOWN. For more information see status field of JSON representation in the official documentation.
Users []MdbMongodbClusterUserArgs
A user of the MongoDB cluster. The structure is documented below.
clusterConfig MdbMongodbClusterClusterConfigArgs
Configuration of the MongoDB subcluster. The structure is documented below.
clusterId string
The ID of the cluster.
createdAt string
Creation timestamp of the key.
databases MdbMongodbClusterDatabaseArgs[]
A database of the MongoDB cluster. The structure is documented below.
deletionProtection boolean
Inhibits deletion of the cluster. Can be either true or false.


description string
Description of the MongoDB cluster.
environment string
Deployment environment of the MongoDB cluster. Can be either PRESTABLE or PRODUCTION.
folderId string
The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
health string
The health of the host.
hosts MdbMongodbClusterHostArgs[]
A host of the MongoDB cluster. The structure is documented below.
labels {[key: string]: string}
A set of key/value label pairs to assign to the MongoDB cluster.
maintenanceWindow MdbMongodbClusterMaintenanceWindowArgs
name string
The fully qualified domain name of the host. Computed on server side.
networkId string
ID of the network, to which the MongoDB cluster belongs.
resources MdbMongodbClusterResourcesArgs
Resources allocated to hosts of the MongoDB cluster. The structure is documented below.
securityGroupIds string[]
A set of ids of security groups assigned to hosts of the cluster.
sharded boolean
MongoDB Cluster mode enabled/disabled.
status string
Status of the cluster. Can be either CREATING, STARTING, RUNNING, UPDATING, STOPPING, STOPPED, ERROR or STATUS_UNKNOWN. For more information see status field of JSON representation in the official documentation.
users MdbMongodbClusterUserArgs[]
A user of the MongoDB cluster. The structure is documented below.
cluster_config MdbMongodbClusterClusterConfigArgs
Configuration of the MongoDB subcluster. The structure is documented below.
cluster_id str
The ID of the cluster.
created_at str
Creation timestamp of the key.
databases Sequence[MdbMongodbClusterDatabaseArgs]
A database of the MongoDB cluster. The structure is documented below.
deletion_protection bool
Inhibits deletion of the cluster. Can be either true or false.


description str
Description of the MongoDB cluster.
environment str
Deployment environment of the MongoDB cluster. Can be either PRESTABLE or PRODUCTION.
folder_id str
The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.
health str
The health of the host.
hosts Sequence[MdbMongodbClusterHostArgs]
A host of the MongoDB cluster. The structure is documented below.
labels Mapping[str, str]
A set of key/value label pairs to assign to the MongoDB cluster.
maintenance_window MdbMongodbClusterMaintenanceWindowArgs
name str
The fully qualified domain name of the host. Computed on server side.
network_id str
ID of the network, to which the MongoDB cluster belongs.
resources MdbMongodbClusterResourcesArgs
Resources allocated to hosts of the MongoDB cluster. The structure is documented below.
security_group_ids Sequence[str]
A set of ids of security groups assigned to hosts of the cluster.
sharded bool
MongoDB Cluster mode enabled/disabled.
status str
Status of the cluster. Can be either CREATING, STARTING, RUNNING, UPDATING, STOPPING, STOPPED, ERROR or STATUS_UNKNOWN. For more information see status field of JSON representation in the official documentation.
users Sequence[MdbMongodbClusterUserArgs]
A user of the MongoDB cluster. The structure is documented below.

Supporting Types

MdbMongodbClusterClusterConfig

Version string
Version of MongoDB (either 5.0, 4.4, 4.2 or 4.0).
Access MdbMongodbClusterClusterConfigAccess
Shows whether cluster has access to data lens. The structure is documented below.
BackupWindowStart MdbMongodbClusterClusterConfigBackupWindowStart
Time to start the daily backup, in the UTC timezone. The structure is documented below.
FeatureCompatibilityVersion string
Feature compatibility version of MongoDB. If not provided version is taken. Can be either 5.0, 4.4, 4.2 and 4.0.
Version string
Version of MongoDB (either 5.0, 4.4, 4.2 or 4.0).
Access MdbMongodbClusterClusterConfigAccess
Shows whether cluster has access to data lens. The structure is documented below.
BackupWindowStart MdbMongodbClusterClusterConfigBackupWindowStart
Time to start the daily backup, in the UTC timezone. The structure is documented below.
FeatureCompatibilityVersion string
Feature compatibility version of MongoDB. If not provided version is taken. Can be either 5.0, 4.4, 4.2 and 4.0.
version string
Version of MongoDB (either 5.0, 4.4, 4.2 or 4.0).
access MdbMongodbClusterClusterConfigAccess
Shows whether cluster has access to data lens. The structure is documented below.
backupWindowStart MdbMongodbClusterClusterConfigBackupWindowStart
Time to start the daily backup, in the UTC timezone. The structure is documented below.
featureCompatibilityVersion string
Feature compatibility version of MongoDB. If not provided version is taken. Can be either 5.0, 4.4, 4.2 and 4.0.
version str
Version of MongoDB (either 5.0, 4.4, 4.2 or 4.0).
access MdbMongodbClusterClusterConfigAccess
Shows whether cluster has access to data lens. The structure is documented below.
backup_window_start MdbMongodbClusterClusterConfigBackupWindowStart
Time to start the daily backup, in the UTC timezone. The structure is documented below.
feature_compatibility_version str
Feature compatibility version of MongoDB. If not provided version is taken. Can be either 5.0, 4.4, 4.2 and 4.0.

MdbMongodbClusterClusterConfigAccess

DataLens bool
Allow access for DataLens.
DataLens bool
Allow access for DataLens.
dataLens boolean
Allow access for DataLens.
data_lens bool
Allow access for DataLens.

MdbMongodbClusterClusterConfigBackupWindowStart

Hours int
The hour at which backup will be started.
Minutes int
The minute at which backup will be started.
Hours int
The hour at which backup will be started.
Minutes int
The minute at which backup will be started.
hours number
The hour at which backup will be started.
minutes number
The minute at which backup will be started.
hours int
The hour at which backup will be started.
minutes int
The minute at which backup will be started.

MdbMongodbClusterDatabase

Name string
The fully qualified domain name of the host. Computed on server side.
Name string
The fully qualified domain name of the host. Computed on server side.
name string
The fully qualified domain name of the host. Computed on server side.
name str
The fully qualified domain name of the host. Computed on server side.

MdbMongodbClusterHost

SubnetId string
The ID of the subnet, to which the host belongs. The subnet must be a part of the network to which the cluster belongs.
ZoneId string
The availability zone where the MongoDB host will be created. For more information see the official documentation.
AssignPublicIp bool
-(Optional) Should this host have assigned public IP assigned. Can be either true or false.
Health string
The health of the host.
Name string
The fully qualified domain name of the host. Computed on server side.
Role string
The role of the cluster (either PRIMARY or SECONDARY).
ShardName string
The name of the shard to which the host belongs.
Type string
Type of maintenance window. Can be either ANYTIME or WEEKLY. A day and hour of window need to be specified with weekly window.
SubnetId string
The ID of the subnet, to which the host belongs. The subnet must be a part of the network to which the cluster belongs.
ZoneId string
The availability zone where the MongoDB host will be created. For more information see the official documentation.
AssignPublicIp bool
-(Optional) Should this host have assigned public IP assigned. Can be either true or false.
Health string
The health of the host.
Name string
The fully qualified domain name of the host. Computed on server side.
Role string
The role of the cluster (either PRIMARY or SECONDARY).
ShardName string
The name of the shard to which the host belongs.
Type string
Type of maintenance window. Can be either ANYTIME or WEEKLY. A day and hour of window need to be specified with weekly window.
subnetId string
The ID of the subnet, to which the host belongs. The subnet must be a part of the network to which the cluster belongs.
zoneId string
The availability zone where the MongoDB host will be created. For more information see the official documentation.
assignPublicIp boolean
-(Optional) Should this host have assigned public IP assigned. Can be either true or false.
health string
The health of the host.
name string
The fully qualified domain name of the host. Computed on server side.
role string
The role of the cluster (either PRIMARY or SECONDARY).
shardName string
The name of the shard to which the host belongs.
type string
Type of maintenance window. Can be either ANYTIME or WEEKLY. A day and hour of window need to be specified with weekly window.
subnet_id str
The ID of the subnet, to which the host belongs. The subnet must be a part of the network to which the cluster belongs.
zone_id str
The availability zone where the MongoDB host will be created. For more information see the official documentation.
assign_public_ip bool
-(Optional) Should this host have assigned public IP assigned. Can be either true or false.
health str
The health of the host.
name str
The fully qualified domain name of the host. Computed on server side.
role str
The role of the cluster (either PRIMARY or SECONDARY).
shard_name str
The name of the shard to which the host belongs.
type str
Type of maintenance window. Can be either ANYTIME or WEEKLY. A day and hour of window need to be specified with weekly window.

MdbMongodbClusterMaintenanceWindow

Type string
Type of maintenance window. Can be either ANYTIME or WEEKLY. A day and hour of window need to be specified with weekly window.
Day string
Day of week for maintenance window if window type is weekly. Possible values: MON, TUE, WED, THU, FRI, SAT, SUN.
Hour int
Hour of day in UTC time zone (1-24) for maintenance window if window type is weekly.
Type string
Type of maintenance window. Can be either ANYTIME or WEEKLY. A day and hour of window need to be specified with weekly window.
Day string
Day of week for maintenance window if window type is weekly. Possible values: MON, TUE, WED, THU, FRI, SAT, SUN.
Hour int
Hour of day in UTC time zone (1-24) for maintenance window if window type is weekly.
type string
Type of maintenance window. Can be either ANYTIME or WEEKLY. A day and hour of window need to be specified with weekly window.
day string
Day of week for maintenance window if window type is weekly. Possible values: MON, TUE, WED, THU, FRI, SAT, SUN.
hour number
Hour of day in UTC time zone (1-24) for maintenance window if window type is weekly.
type str
Type of maintenance window. Can be either ANYTIME or WEEKLY. A day and hour of window need to be specified with weekly window.
day str
Day of week for maintenance window if window type is weekly. Possible values: MON, TUE, WED, THU, FRI, SAT, SUN.
hour int
Hour of day in UTC time zone (1-24) for maintenance window if window type is weekly.

MdbMongodbClusterResources

DiskSize int
Volume of the storage available to a MongoDB host, in gigabytes.
DiskTypeId string
Type of the storage of MongoDB hosts. For more information see the official documentation.
ResourcePresetId string
DiskSize int
Volume of the storage available to a MongoDB host, in gigabytes.
DiskTypeId string
Type of the storage of MongoDB hosts. For more information see the official documentation.
ResourcePresetId string
diskSize number
Volume of the storage available to a MongoDB host, in gigabytes.
diskTypeId string
Type of the storage of MongoDB hosts. For more information see the official documentation.
resourcePresetId string
disk_size int
Volume of the storage available to a MongoDB host, in gigabytes.
disk_type_id str
Type of the storage of MongoDB hosts. For more information see the official documentation.
resource_preset_id str

MdbMongodbClusterUser

Name string
The fully qualified domain name of the host. Computed on server side.
Password string
The password of the user.
Permissions List<MdbMongodbClusterUserPermission>
Set of permissions granted to the user. The structure is documented below.
Name string
The fully qualified domain name of the host. Computed on server side.
Password string
The password of the user.
Permissions []MdbMongodbClusterUserPermission
Set of permissions granted to the user. The structure is documented below.
name string
The fully qualified domain name of the host. Computed on server side.
password string
The password of the user.
permissions MdbMongodbClusterUserPermission[]
Set of permissions granted to the user. The structure is documented below.
name str
The fully qualified domain name of the host. Computed on server side.
password str
The password of the user.
permissions Sequence[MdbMongodbClusterUserPermission]
Set of permissions granted to the user. The structure is documented below.

MdbMongodbClusterUserPermission

DatabaseName string
The name of the database that the permission grants access to.
Roles List<string>
DatabaseName string
The name of the database that the permission grants access to.
Roles []string
databaseName string
The name of the database that the permission grants access to.
roles string[]
database_name str
The name of the database that the permission grants access to.
roles Sequence[str]

Import

A cluster can be imported using the id of the resource, e.g.

 $ pulumi import yandex:index/mdbMongodbCluster:MdbMongodbCluster foo cluster_id

Package Details

Repository
https://github.com/pulumi/pulumi-yandex
License
Apache-2.0
Notes
This Pulumi package is based on the yandex Terraform Provider.