Yandex

Pulumi Official
Package maintained by Pulumi
v0.13.0 published on Tuesday, Feb 22, 2022 by Pulumi

MdbSqlServerCluster

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

Please read Pricing for Managed Service for SQL Server before using SQLServer cluster.

SQLServer config

If not specified sqlserver_config then does not make any changes.

  • max_degree_of_parallelism - Limits the number of processors to use in parallel plan execution per task. See in-depth description in SQL Server documentation.

  • cost_threshold_for_parallelism - Specifies the threshold at which SQL Server creates and runs parallel plans for queries. SQL Server creates and runs a parallel plan for a query only when the estimated cost to run a serial plan for the same query is higher than the value of the option. See in-depth description in SQL Server documentation.

  • audit_level - Describes how to configure login auditing to monitor SQL Server Database Engine login activity. Possible values:

    • 0 — do not log login attempts,˚√
    • 1 — log only failed login attempts,
    • 2 — log only successful login attempts (not recommended),
    • 3 — log all login attempts (not recommended). See in-depth description in SQL Server documentation.
  • fill_factor_percent - Manages the fill factor server configuration option. When an index is created or rebuilt the fill factor determines the percentage of space on each index leaf-level page to be filled with data, reserving the rest as free space for future growth. Values 0 and 100 mean full page usage (no space reserved). See in-depth description in SQL Server documentation.

  • optimize_for_ad_hoc_workloads - Determines whether plans should be cached only after second execution. Allows to avoid SQL cache bloat because of single-use plans. See in-depth description in SQL Server 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
        {
            Zone = "ru-central1-a",
            NetworkId = fooVpcNetwork.Id,
            V4CidrBlocks = 
            {
                "10.5.0.0/24",
            },
        });
        var test_sg_x = new Yandex.VpcSecurityGroup("test-sg-x", new Yandex.VpcSecurityGroupArgs
        {
            NetworkId = fooVpcNetwork.Id,
            Ingresses = 
            {
                new Yandex.Inputs.VpcSecurityGroupIngressArgs
                {
                    Protocol = "ANY",
                    Description = "Allow incoming traffic from members of the same security group",
                    FromPort = 0,
                    ToPort = 65535,
                    V4CidrBlocks = 
                    {
                        "0.0.0.0/0",
                    },
                },
            },
            Egresses = 
            {
                new Yandex.Inputs.VpcSecurityGroupEgressArgs
                {
                    Protocol = "ANY",
                    Description = "Allow outgoing traffic to members of the same security group",
                    FromPort = 0,
                    ToPort = 65535,
                    V4CidrBlocks = 
                    {
                        "0.0.0.0/0",
                    },
                },
            },
        });
        var fooMdbSqlServerCluster = new Yandex.MdbSqlServerCluster("fooMdbSqlServerCluster", new Yandex.MdbSqlServerClusterArgs
        {
            Environment = "PRESTABLE",
            NetworkId = fooVpcNetwork.Id,
            Version = "2016sp2std",
            Resources = new Yandex.Inputs.MdbSqlServerClusterResourcesArgs
            {
                ResourcePresetId = "s2.small",
                DiskTypeId = "network-ssd",
                DiskSize = 20,
            },
            Labels = 
            {
                { "test_key", "test_value" },
            },
            BackupWindowStart = new Yandex.Inputs.MdbSqlServerClusterBackupWindowStartArgs
            {
                Hours = 20,
                Minutes = 30,
            },
            SqlserverConfig = 
            {
                { "fill_factor_percent", "49" },
                { "optimize_for_ad_hoc_workloads", "true" },
            },
            Databases = 
            {
                new Yandex.Inputs.MdbSqlServerClusterDatabaseArgs
                {
                    Name = "db_name_a",
                },
                new Yandex.Inputs.MdbSqlServerClusterDatabaseArgs
                {
                    Name = "db_name",
                },
                new Yandex.Inputs.MdbSqlServerClusterDatabaseArgs
                {
                    Name = "db_name_b",
                },
            },
            Users = 
            {
                new Yandex.Inputs.MdbSqlServerClusterUserArgs
                {
                    Name = "bob",
                    Password = "mysecurepassword",
                },
                new Yandex.Inputs.MdbSqlServerClusterUserArgs
                {
                    Name = "alice",
                    Password = "mysecurepassword",
                    Permissions = 
                    {
                        new Yandex.Inputs.MdbSqlServerClusterUserPermissionArgs
                        {
                            DatabaseName = "db_name",
                            Roles = 
                            {
                                "DDLADMIN",
                            },
                        },
                    },
                },
                new Yandex.Inputs.MdbSqlServerClusterUserArgs
                {
                    Name = "chuck",
                    Password = "mysecurepassword",
                    Permissions = 
                    {
                        new Yandex.Inputs.MdbSqlServerClusterUserPermissionArgs
                        {
                            DatabaseName = "db_name_a",
                            Roles = 
                            {
                                "OWNER",
                            },
                        },
                        new Yandex.Inputs.MdbSqlServerClusterUserPermissionArgs
                        {
                            DatabaseName = "db_name",
                            Roles = 
                            {
                                "OWNER",
                                "DDLADMIN",
                            },
                        },
                        new Yandex.Inputs.MdbSqlServerClusterUserPermissionArgs
                        {
                            DatabaseName = "db_name_b",
                            Roles = 
                            {
                                "OWNER",
                                "DDLADMIN",
                            },
                        },
                    },
                },
            },
            Hosts = 
            {
                new Yandex.Inputs.MdbSqlServerClusterHostArgs
                {
                    Zone = "ru-central1-a",
                    SubnetId = fooVpcSubnet.Id,
                },
            },
            SecurityGroupIds = 
            {
                test_sg_x.Id,
            },
            HostGroupIds = 
            {
                "host_group_1",
                "host_group_2",
            },
        });
    }

}
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{
			Zone:      pulumi.String("ru-central1-a"),
			NetworkId: fooVpcNetwork.ID(),
			V4CidrBlocks: pulumi.StringArray{
				pulumi.String("10.5.0.0/24"),
			},
		})
		if err != nil {
			return err
		}
		_, err = yandex.NewVpcSecurityGroup(ctx, "test-sg-x", &yandex.VpcSecurityGroupArgs{
			NetworkId: fooVpcNetwork.ID(),
			Ingresses: VpcSecurityGroupIngressArray{
				&VpcSecurityGroupIngressArgs{
					Protocol:    pulumi.String("ANY"),
					Description: pulumi.String("Allow incoming traffic from members of the same security group"),
					FromPort:    pulumi.Int(0),
					ToPort:      pulumi.Int(65535),
					V4CidrBlocks: pulumi.StringArray{
						pulumi.String("0.0.0.0/0"),
					},
				},
			},
			Egresses: VpcSecurityGroupEgressArray{
				&VpcSecurityGroupEgressArgs{
					Protocol:    pulumi.String("ANY"),
					Description: pulumi.String("Allow outgoing traffic to members of the same security group"),
					FromPort:    pulumi.Int(0),
					ToPort:      pulumi.Int(65535),
					V4CidrBlocks: pulumi.StringArray{
						pulumi.String("0.0.0.0/0"),
					},
				},
			},
		})
		if err != nil {
			return err
		}
		_, err = yandex.NewMdbSqlServerCluster(ctx, "fooMdbSqlServerCluster", &yandex.MdbSqlServerClusterArgs{
			Environment: pulumi.String("PRESTABLE"),
			NetworkId:   fooVpcNetwork.ID(),
			Version:     pulumi.String("2016sp2std"),
			Resources: &MdbSqlServerClusterResourcesArgs{
				ResourcePresetId: pulumi.String("s2.small"),
				DiskTypeId:       pulumi.String("network-ssd"),
				DiskSize:         pulumi.Int(20),
			},
			Labels: pulumi.StringMap{
				"test_key": pulumi.String("test_value"),
			},
			BackupWindowStart: &MdbSqlServerClusterBackupWindowStartArgs{
				Hours:   pulumi.Int(20),
				Minutes: pulumi.Int(30),
			},
			SqlserverConfig: pulumi.StringMap{
				"fill_factor_percent":           pulumi.String("49"),
				"optimize_for_ad_hoc_workloads": pulumi.String("true"),
			},
			Databases: MdbSqlServerClusterDatabaseArray{
				&MdbSqlServerClusterDatabaseArgs{
					Name: pulumi.String("db_name_a"),
				},
				&MdbSqlServerClusterDatabaseArgs{
					Name: pulumi.String("db_name"),
				},
				&MdbSqlServerClusterDatabaseArgs{
					Name: pulumi.String("db_name_b"),
				},
			},
			Users: MdbSqlServerClusterUserArray{
				&MdbSqlServerClusterUserArgs{
					Name:     pulumi.String("bob"),
					Password: pulumi.String("mysecurepassword"),
				},
				&MdbSqlServerClusterUserArgs{
					Name:     pulumi.String("alice"),
					Password: pulumi.String("mysecurepassword"),
					Permissions: MdbSqlServerClusterUserPermissionArray{
						&MdbSqlServerClusterUserPermissionArgs{
							DatabaseName: pulumi.String("db_name"),
							Roles: pulumi.StringArray{
								pulumi.String("DDLADMIN"),
							},
						},
					},
				},
				&MdbSqlServerClusterUserArgs{
					Name:     pulumi.String("chuck"),
					Password: pulumi.String("mysecurepassword"),
					Permissions: MdbSqlServerClusterUserPermissionArray{
						&MdbSqlServerClusterUserPermissionArgs{
							DatabaseName: pulumi.String("db_name_a"),
							Roles: pulumi.StringArray{
								pulumi.String("OWNER"),
							},
						},
						&MdbSqlServerClusterUserPermissionArgs{
							DatabaseName: pulumi.String("db_name"),
							Roles: pulumi.StringArray{
								pulumi.String("OWNER"),
								pulumi.String("DDLADMIN"),
							},
						},
						&MdbSqlServerClusterUserPermissionArgs{
							DatabaseName: pulumi.String("db_name_b"),
							Roles: pulumi.StringArray{
								pulumi.String("OWNER"),
								pulumi.String("DDLADMIN"),
							},
						},
					},
				},
			},
			Hosts: MdbSqlServerClusterHostArray{
				&MdbSqlServerClusterHostArgs{
					Zone:     pulumi.String("ru-central1-a"),
					SubnetId: fooVpcSubnet.ID(),
				},
			},
			SecurityGroupIds: pulumi.StringArray{
				test_sg_x.ID(),
			},
			HostGroupIds: pulumi.StringArray{
				pulumi.String("host_group_1"),
				pulumi.String("host_group_2"),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}

Coming soon!

import pulumi
import pulumi_yandex as yandex

foo_vpc_network = yandex.VpcNetwork("fooVpcNetwork")
foo_vpc_subnet = yandex.VpcSubnet("fooVpcSubnet",
    zone="ru-central1-a",
    network_id=foo_vpc_network.id,
    v4_cidr_blocks=["10.5.0.0/24"])
test_sg_x = yandex.VpcSecurityGroup("test-sg-x",
    network_id=foo_vpc_network.id,
    ingresses=[yandex.VpcSecurityGroupIngressArgs(
        protocol="ANY",
        description="Allow incoming traffic from members of the same security group",
        from_port=0,
        to_port=65535,
        v4_cidr_blocks=["0.0.0.0/0"],
    )],
    egresses=[yandex.VpcSecurityGroupEgressArgs(
        protocol="ANY",
        description="Allow outgoing traffic to members of the same security group",
        from_port=0,
        to_port=65535,
        v4_cidr_blocks=["0.0.0.0/0"],
    )])
foo_mdb_sql_server_cluster = yandex.MdbSqlServerCluster("fooMdbSqlServerCluster",
    environment="PRESTABLE",
    network_id=foo_vpc_network.id,
    version="2016sp2std",
    resources=yandex.MdbSqlServerClusterResourcesArgs(
        resource_preset_id="s2.small",
        disk_type_id="network-ssd",
        disk_size=20,
    ),
    labels={
        "test_key": "test_value",
    },
    backup_window_start=yandex.MdbSqlServerClusterBackupWindowStartArgs(
        hours=20,
        minutes=30,
    ),
    sqlserver_config={
        "fill_factor_percent": "49",
        "optimize_for_ad_hoc_workloads": "true",
    },
    databases=[
        yandex.MdbSqlServerClusterDatabaseArgs(
            name="db_name_a",
        ),
        yandex.MdbSqlServerClusterDatabaseArgs(
            name="db_name",
        ),
        yandex.MdbSqlServerClusterDatabaseArgs(
            name="db_name_b",
        ),
    ],
    users=[
        yandex.MdbSqlServerClusterUserArgs(
            name="bob",
            password="mysecurepassword",
        ),
        yandex.MdbSqlServerClusterUserArgs(
            name="alice",
            password="mysecurepassword",
            permissions=[yandex.MdbSqlServerClusterUserPermissionArgs(
                database_name="db_name",
                roles=["DDLADMIN"],
            )],
        ),
        yandex.MdbSqlServerClusterUserArgs(
            name="chuck",
            password="mysecurepassword",
            permissions=[
                yandex.MdbSqlServerClusterUserPermissionArgs(
                    database_name="db_name_a",
                    roles=["OWNER"],
                ),
                yandex.MdbSqlServerClusterUserPermissionArgs(
                    database_name="db_name",
                    roles=[
                        "OWNER",
                        "DDLADMIN",
                    ],
                ),
                yandex.MdbSqlServerClusterUserPermissionArgs(
                    database_name="db_name_b",
                    roles=[
                        "OWNER",
                        "DDLADMIN",
                    ],
                ),
            ],
        ),
    ],
    hosts=[yandex.MdbSqlServerClusterHostArgs(
        zone="ru-central1-a",
        subnet_id=foo_vpc_subnet.id,
    )],
    security_group_ids=[test_sg_x.id],
    host_group_ids=[
        "host_group_1",
        "host_group_2",
    ])
import * as pulumi from "@pulumi/pulumi";
import * as yandex from "@pulumi/yandex";

const fooVpcNetwork = new yandex.VpcNetwork("fooVpcNetwork", {});
const fooVpcSubnet = new yandex.VpcSubnet("fooVpcSubnet", {
    zone: "ru-central1-a",
    networkId: fooVpcNetwork.id,
    v4CidrBlocks: ["10.5.0.0/24"],
});
const test_sg_x = new yandex.VpcSecurityGroup("test-sg-x", {
    networkId: fooVpcNetwork.id,
    ingresses: [{
        protocol: "ANY",
        description: "Allow incoming traffic from members of the same security group",
        fromPort: 0,
        toPort: 65535,
        v4CidrBlocks: ["0.0.0.0/0"],
    }],
    egresses: [{
        protocol: "ANY",
        description: "Allow outgoing traffic to members of the same security group",
        fromPort: 0,
        toPort: 65535,
        v4CidrBlocks: ["0.0.0.0/0"],
    }],
});
const fooMdbSqlServerCluster = new yandex.MdbSqlServerCluster("fooMdbSqlServerCluster", {
    environment: "PRESTABLE",
    networkId: fooVpcNetwork.id,
    version: "2016sp2std",
    resources: {
        resourcePresetId: "s2.small",
        diskTypeId: "network-ssd",
        diskSize: 20,
    },
    labels: {
        test_key: "test_value",
    },
    backupWindowStart: {
        hours: 20,
        minutes: 30,
    },
    sqlserverConfig: {
        fill_factor_percent: 49,
        optimize_for_ad_hoc_workloads: true,
    },
    databases: [
        {
            name: "db_name_a",
        },
        {
            name: "db_name",
        },
        {
            name: "db_name_b",
        },
    ],
    users: [
        {
            name: "bob",
            password: "mysecurepassword",
        },
        {
            name: "alice",
            password: "mysecurepassword",
            permissions: [{
                databaseName: "db_name",
                roles: ["DDLADMIN"],
            }],
        },
        {
            name: "chuck",
            password: "mysecurepassword",
            permissions: [
                {
                    databaseName: "db_name_a",
                    roles: ["OWNER"],
                },
                {
                    databaseName: "db_name",
                    roles: [
                        "OWNER",
                        "DDLADMIN",
                    ],
                },
                {
                    databaseName: "db_name_b",
                    roles: [
                        "OWNER",
                        "DDLADMIN",
                    ],
                },
            ],
        },
    ],
    hosts: [{
        zone: "ru-central1-a",
        subnetId: fooVpcSubnet.id,
    }],
    securityGroupIds: [test_sg_x.id],
    hostGroupIds: [
        "host_group_1",
        "host_group_2",
    ],
});

Coming soon!

Create a MdbSqlServerCluster Resource

new MdbSqlServerCluster(name: string, args: MdbSqlServerClusterArgs, opts?: CustomResourceOptions);
@overload
def MdbSqlServerCluster(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        backup_window_start: Optional[MdbSqlServerClusterBackupWindowStartArgs] = None,
                        databases: Optional[Sequence[MdbSqlServerClusterDatabaseArgs]] = None,
                        deletion_protection: Optional[bool] = None,
                        description: Optional[str] = None,
                        environment: Optional[str] = None,
                        folder_id: Optional[str] = None,
                        host_group_ids: Optional[Sequence[str]] = None,
                        hosts: Optional[Sequence[MdbSqlServerClusterHostArgs]] = None,
                        labels: Optional[Mapping[str, str]] = None,
                        name: Optional[str] = None,
                        network_id: Optional[str] = None,
                        resources: Optional[MdbSqlServerClusterResourcesArgs] = None,
                        security_group_ids: Optional[Sequence[str]] = None,
                        sqlserver_config: Optional[Mapping[str, str]] = None,
                        users: Optional[Sequence[MdbSqlServerClusterUserArgs]] = None,
                        version: Optional[str] = None)
@overload
def MdbSqlServerCluster(resource_name: str,
                        args: MdbSqlServerClusterArgs,
                        opts: Optional[ResourceOptions] = None)
func NewMdbSqlServerCluster(ctx *Context, name string, args MdbSqlServerClusterArgs, opts ...ResourceOption) (*MdbSqlServerCluster, error)
public MdbSqlServerCluster(string name, MdbSqlServerClusterArgs args, CustomResourceOptions? opts = null)
public MdbSqlServerCluster(String name, MdbSqlServerClusterArgs args)
public MdbSqlServerCluster(String name, MdbSqlServerClusterArgs args, CustomResourceOptions options)
type: yandex:MdbSqlServerCluster
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args MdbSqlServerClusterArgs
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 MdbSqlServerClusterArgs
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 MdbSqlServerClusterArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args MdbSqlServerClusterArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args MdbSqlServerClusterArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

MdbSqlServerCluster 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 MdbSqlServerCluster resource accepts the following input properties:

Databases List<MdbSqlServerClusterDatabaseArgs>

A database of the SQLServer cluster. The structure is documented below.

Environment string

Deployment environment of the SQLServer cluster. (PRODUCTION, PRESTABLE)

Hosts List<MdbSqlServerClusterHostArgs>

A host of the SQLServer cluster. The structure is documented below.

NetworkId string

ID of the network, to which the SQLServer cluster uses.

Resources MdbSqlServerClusterResourcesArgs

Resources allocated to hosts of the SQLServer cluster. The structure is documented below.

Users List<MdbSqlServerClusterUserArgs>

A user of the SQLServer cluster. The structure is documented below.

Version string

Version of the SQLServer cluster. (2016sp2std, 2016sp2ent)

BackupWindowStart MdbSqlServerClusterBackupWindowStartArgs

Time to start the daily backup, in the UTC. The structure is documented below.

DeletionProtection bool

Inhibits deletion of the cluster. Can be either true or false.

Description string

Description of the SQLServer cluster.

FolderId string

The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.

HostGroupIds List<string>

A list of IDs of the host groups hosting VMs of the cluster.

Labels Dictionary<string, string>

A set of key/value label pairs to assign to the SQLServer cluster.

Name string

The name of the database.

SecurityGroupIds List<string>

A set of ids of security groups assigned to hosts of the cluster.

SqlserverConfig Dictionary<string, string>

SQLServer cluster config. Detail info in "SQLServer config" section (documented below).

Databases []MdbSqlServerClusterDatabaseArgs

A database of the SQLServer cluster. The structure is documented below.

Environment string

Deployment environment of the SQLServer cluster. (PRODUCTION, PRESTABLE)

Hosts []MdbSqlServerClusterHostArgs

A host of the SQLServer cluster. The structure is documented below.

NetworkId string

ID of the network, to which the SQLServer cluster uses.

Resources MdbSqlServerClusterResourcesArgs

Resources allocated to hosts of the SQLServer cluster. The structure is documented below.

Users []MdbSqlServerClusterUserArgs

A user of the SQLServer cluster. The structure is documented below.

Version string

Version of the SQLServer cluster. (2016sp2std, 2016sp2ent)

BackupWindowStart MdbSqlServerClusterBackupWindowStartArgs

Time to start the daily backup, in the UTC. The structure is documented below.

DeletionProtection bool

Inhibits deletion of the cluster. Can be either true or false.

Description string

Description of the SQLServer cluster.

FolderId string

The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.

HostGroupIds []string

A list of IDs of the host groups hosting VMs of the cluster.

Labels map[string]string

A set of key/value label pairs to assign to the SQLServer cluster.

Name string

The name of the database.

SecurityGroupIds []string

A set of ids of security groups assigned to hosts of the cluster.

SqlserverConfig map[string]string

SQLServer cluster config. Detail info in "SQLServer config" section (documented below).

databases ListSqlServerClusterDatabaseArgs>

A database of the SQLServer cluster. The structure is documented below.

environment String

Deployment environment of the SQLServer cluster. (PRODUCTION, PRESTABLE)

hosts ListSqlServerClusterHostArgs>

A host of the SQLServer cluster. The structure is documented below.

networkId String

ID of the network, to which the SQLServer cluster uses.

resources MdbSqlServerClusterResourcesArgs

Resources allocated to hosts of the SQLServer cluster. The structure is documented below.

users ListSqlServerClusterUserArgs>

A user of the SQLServer cluster. The structure is documented below.

version String

Version of the SQLServer cluster. (2016sp2std, 2016sp2ent)

backupWindowStart MdbSqlServerClusterBackupWindowStartArgs

Time to start the daily backup, in the UTC. The structure is documented below.

deletionProtection Boolean

Inhibits deletion of the cluster. Can be either true or false.

description String

Description of the SQLServer cluster.

folderId String

The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.

hostGroupIds List

A list of IDs of the host groups hosting VMs of the cluster.

labels Map

A set of key/value label pairs to assign to the SQLServer cluster.

name String

The name of the database.

securityGroupIds List

A set of ids of security groups assigned to hosts of the cluster.

sqlserverConfig Map

SQLServer cluster config. Detail info in "SQLServer config" section (documented below).

databases MdbSqlServerClusterDatabaseArgs[]

A database of the SQLServer cluster. The structure is documented below.

environment string

Deployment environment of the SQLServer cluster. (PRODUCTION, PRESTABLE)

hosts MdbSqlServerClusterHostArgs[]

A host of the SQLServer cluster. The structure is documented below.

networkId string

ID of the network, to which the SQLServer cluster uses.

resources MdbSqlServerClusterResourcesArgs

Resources allocated to hosts of the SQLServer cluster. The structure is documented below.

users MdbSqlServerClusterUserArgs[]

A user of the SQLServer cluster. The structure is documented below.

version string

Version of the SQLServer cluster. (2016sp2std, 2016sp2ent)

backupWindowStart MdbSqlServerClusterBackupWindowStartArgs

Time to start the daily backup, in the UTC. The structure is documented below.

deletionProtection boolean

Inhibits deletion of the cluster. Can be either true or false.

description string

Description of the SQLServer cluster.

folderId string

The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.

hostGroupIds string[]

A list of IDs of the host groups hosting VMs of the cluster.

labels {[key: string]: string}

A set of key/value label pairs to assign to the SQLServer cluster.

name string

The name of the database.

securityGroupIds string[]

A set of ids of security groups assigned to hosts of the cluster.

sqlserverConfig {[key: string]: string}

SQLServer cluster config. Detail info in "SQLServer config" section (documented below).

databases Sequence[MdbSqlServerClusterDatabaseArgs]

A database of the SQLServer cluster. The structure is documented below.

environment str

Deployment environment of the SQLServer cluster. (PRODUCTION, PRESTABLE)

hosts Sequence[MdbSqlServerClusterHostArgs]

A host of the SQLServer cluster. The structure is documented below.

network_id str

ID of the network, to which the SQLServer cluster uses.

resources MdbSqlServerClusterResourcesArgs

Resources allocated to hosts of the SQLServer cluster. The structure is documented below.

users Sequence[MdbSqlServerClusterUserArgs]

A user of the SQLServer cluster. The structure is documented below.

version str

Version of the SQLServer cluster. (2016sp2std, 2016sp2ent)

backup_window_start MdbSqlServerClusterBackupWindowStartArgs

Time to start the daily backup, in the UTC. The structure is documented below.

deletion_protection bool

Inhibits deletion of the cluster. Can be either true or false.

description str

Description of the SQLServer 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.

host_group_ids Sequence[str]

A list of IDs of the host groups hosting VMs of the cluster.

labels Mapping[str, str]

A set of key/value label pairs to assign to the SQLServer cluster.

name str

The name of the database.

security_group_ids Sequence[str]

A set of ids of security groups assigned to hosts of the cluster.

sqlserver_config Mapping[str, str]

SQLServer cluster config. Detail info in "SQLServer config" section (documented below).

databases List

A database of the SQLServer cluster. The structure is documented below.

environment String

Deployment environment of the SQLServer cluster. (PRODUCTION, PRESTABLE)

hosts List

A host of the SQLServer cluster. The structure is documented below.

networkId String

ID of the network, to which the SQLServer cluster uses.

resources Property Map

Resources allocated to hosts of the SQLServer cluster. The structure is documented below.

users List

A user of the SQLServer cluster. The structure is documented below.

version String

Version of the SQLServer cluster. (2016sp2std, 2016sp2ent)

backupWindowStart Property Map

Time to start the daily backup, in the UTC. The structure is documented below.

deletionProtection Boolean

Inhibits deletion of the cluster. Can be either true or false.

description String

Description of the SQLServer cluster.

folderId String

The ID of the folder that the resource belongs to. If it is not provided, the default provider folder is used.

hostGroupIds List

A list of IDs of the host groups hosting VMs of the cluster.

labels Map

A set of key/value label pairs to assign to the SQLServer cluster.

name String

The name of the database.

securityGroupIds List

A set of ids of security groups assigned to hosts of the cluster.

sqlserverConfig Map

SQLServer cluster config. Detail info in "SQLServer config" section (documented below).

Outputs

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

CreatedAt string

Creation timestamp of the cluster.

Health string

Aggregated health of the cluster.

Id string

The provider-assigned unique ID for this managed resource.

Status string

Status of the cluster.

CreatedAt string

Creation timestamp of the cluster.

Health string

Aggregated health of the cluster.

Id string

The provider-assigned unique ID for this managed resource.

Status string

Status of the cluster.

createdAt String

Creation timestamp of the cluster.

health String

Aggregated health of the cluster.

id String

The provider-assigned unique ID for this managed resource.

status String

Status of the cluster.

createdAt string

Creation timestamp of the cluster.

health string

Aggregated health of the cluster.

id string

The provider-assigned unique ID for this managed resource.

status string

Status of the cluster.

created_at str

Creation timestamp of the cluster.

health str

Aggregated health of the cluster.

id str

The provider-assigned unique ID for this managed resource.

status str

Status of the cluster.

createdAt String

Creation timestamp of the cluster.

health String

Aggregated health of the cluster.

id String

The provider-assigned unique ID for this managed resource.

status String

Status of the cluster.

Look up an Existing MdbSqlServerCluster Resource

Get an existing MdbSqlServerCluster 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?: MdbSqlServerClusterState, opts?: CustomResourceOptions): MdbSqlServerCluster
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        backup_window_start: Optional[MdbSqlServerClusterBackupWindowStartArgs] = None,
        created_at: Optional[str] = None,
        databases: Optional[Sequence[MdbSqlServerClusterDatabaseArgs]] = None,
        deletion_protection: Optional[bool] = None,
        description: Optional[str] = None,
        environment: Optional[str] = None,
        folder_id: Optional[str] = None,
        health: Optional[str] = None,
        host_group_ids: Optional[Sequence[str]] = None,
        hosts: Optional[Sequence[MdbSqlServerClusterHostArgs]] = None,
        labels: Optional[Mapping[str, str]] = None,
        name: Optional[str] = None,
        network_id: Optional[str] = None,
        resources: Optional[MdbSqlServerClusterResourcesArgs] = None,
        security_group_ids: Optional[Sequence[str]] = None,
        sqlserver_config: Optional[Mapping[str, str]] = None,
        status: Optional[str] = None,
        users: Optional[Sequence[MdbSqlServerClusterUserArgs]] = None,
        version: Optional[str] = None) -> MdbSqlServerCluster
func GetMdbSqlServerCluster(ctx *Context, name string, id IDInput, state *MdbSqlServerClusterState, opts ...ResourceOption) (*MdbSqlServerCluster, error)
public static MdbSqlServerCluster Get(string name, Input<string> id, MdbSqlServerClusterState? state, CustomResourceOptions? opts = null)
public static MdbSqlServerCluster get(String name, Output<String> id, MdbSqlServerClusterState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
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.
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:
BackupWindowStart MdbSqlServerClusterBackupWindowStartArgs

Time to start the daily backup, in the UTC. The structure is documented below.

CreatedAt string

Creation timestamp of the cluster.

Databases List<MdbSqlServerClusterDatabaseArgs>

A database of the SQLServer cluster. The structure is documented below.

DeletionProtection bool

Inhibits deletion of the cluster. Can be either true or false.

Description string

Description of the SQLServer cluster.

Environment string

Deployment environment of the SQLServer cluster. (PRODUCTION, PRESTABLE)

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

Aggregated health of the cluster.

HostGroupIds List<string>

A list of IDs of the host groups hosting VMs of the cluster.

Hosts List<MdbSqlServerClusterHostArgs>

A host of the SQLServer cluster. The structure is documented below.

Labels Dictionary<string, string>

A set of key/value label pairs to assign to the SQLServer cluster.

Name string

The name of the database.

NetworkId string

ID of the network, to which the SQLServer cluster uses.

Resources MdbSqlServerClusterResourcesArgs

Resources allocated to hosts of the SQLServer cluster. The structure is documented below.

SecurityGroupIds List<string>

A set of ids of security groups assigned to hosts of the cluster.

SqlserverConfig Dictionary<string, string>

SQLServer cluster config. Detail info in "SQLServer config" section (documented below).

Status string

Status of the cluster.

Users List<MdbSqlServerClusterUserArgs>

A user of the SQLServer cluster. The structure is documented below.

Version string

Version of the SQLServer cluster. (2016sp2std, 2016sp2ent)

BackupWindowStart MdbSqlServerClusterBackupWindowStartArgs

Time to start the daily backup, in the UTC. The structure is documented below.

CreatedAt string

Creation timestamp of the cluster.

Databases []MdbSqlServerClusterDatabaseArgs

A database of the SQLServer cluster. The structure is documented below.

DeletionProtection bool

Inhibits deletion of the cluster. Can be either true or false.

Description string

Description of the SQLServer cluster.

Environment string

Deployment environment of the SQLServer cluster. (PRODUCTION, PRESTABLE)

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

Aggregated health of the cluster.

HostGroupIds []string

A list of IDs of the host groups hosting VMs of the cluster.

Hosts []MdbSqlServerClusterHostArgs

A host of the SQLServer cluster. The structure is documented below.

Labels map[string]string

A set of key/value label pairs to assign to the SQLServer cluster.

Name string

The name of the database.

NetworkId string

ID of the network, to which the SQLServer cluster uses.

Resources MdbSqlServerClusterResourcesArgs

Resources allocated to hosts of the SQLServer cluster. The structure is documented below.

SecurityGroupIds []string

A set of ids of security groups assigned to hosts of the cluster.

SqlserverConfig map[string]string

SQLServer cluster config. Detail info in "SQLServer config" section (documented below).

Status string

Status of the cluster.

Users []MdbSqlServerClusterUserArgs

A user of the SQLServer cluster. The structure is documented below.

Version string

Version of the SQLServer cluster. (2016sp2std, 2016sp2ent)

backupWindowStart MdbSqlServerClusterBackupWindowStartArgs

Time to start the daily backup, in the UTC. The structure is documented below.

createdAt String

Creation timestamp of the cluster.

databases ListSqlServerClusterDatabaseArgs>

A database of the SQLServer cluster. The structure is documented below.

deletionProtection Boolean

Inhibits deletion of the cluster. Can be either true or false.

description String

Description of the SQLServer cluster.

environment String

Deployment environment of the SQLServer cluster. (PRODUCTION, PRESTABLE)

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

Aggregated health of the cluster.

hostGroupIds List

A list of IDs of the host groups hosting VMs of the cluster.

hosts ListSqlServerClusterHostArgs>

A host of the SQLServer cluster. The structure is documented below.

labels Map

A set of key/value label pairs to assign to the SQLServer cluster.

name String

The name of the database.

networkId String

ID of the network, to which the SQLServer cluster uses.

resources MdbSqlServerClusterResourcesArgs

Resources allocated to hosts of the SQLServer cluster. The structure is documented below.

securityGroupIds List

A set of ids of security groups assigned to hosts of the cluster.

sqlserverConfig Map

SQLServer cluster config. Detail info in "SQLServer config" section (documented below).

status String

Status of the cluster.

users ListSqlServerClusterUserArgs>

A user of the SQLServer cluster. The structure is documented below.

version String

Version of the SQLServer cluster. (2016sp2std, 2016sp2ent)

backupWindowStart MdbSqlServerClusterBackupWindowStartArgs

Time to start the daily backup, in the UTC. The structure is documented below.

createdAt string

Creation timestamp of the cluster.

databases MdbSqlServerClusterDatabaseArgs[]

A database of the SQLServer cluster. The structure is documented below.

deletionProtection boolean

Inhibits deletion of the cluster. Can be either true or false.

description string

Description of the SQLServer cluster.

environment string

Deployment environment of the SQLServer cluster. (PRODUCTION, PRESTABLE)

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

Aggregated health of the cluster.

hostGroupIds string[]

A list of IDs of the host groups hosting VMs of the cluster.

hosts MdbSqlServerClusterHostArgs[]

A host of the SQLServer cluster. The structure is documented below.

labels {[key: string]: string}

A set of key/value label pairs to assign to the SQLServer cluster.

name string

The name of the database.

networkId string

ID of the network, to which the SQLServer cluster uses.

resources MdbSqlServerClusterResourcesArgs

Resources allocated to hosts of the SQLServer cluster. The structure is documented below.

securityGroupIds string[]

A set of ids of security groups assigned to hosts of the cluster.

sqlserverConfig {[key: string]: string}

SQLServer cluster config. Detail info in "SQLServer config" section (documented below).

status string

Status of the cluster.

users MdbSqlServerClusterUserArgs[]

A user of the SQLServer cluster. The structure is documented below.

version string

Version of the SQLServer cluster. (2016sp2std, 2016sp2ent)

backup_window_start MdbSqlServerClusterBackupWindowStartArgs

Time to start the daily backup, in the UTC. The structure is documented below.

created_at str

Creation timestamp of the cluster.

databases Sequence[MdbSqlServerClusterDatabaseArgs]

A database of the SQLServer 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 SQLServer cluster.

environment str

Deployment environment of the SQLServer cluster. (PRODUCTION, PRESTABLE)

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

Aggregated health of the cluster.

host_group_ids Sequence[str]

A list of IDs of the host groups hosting VMs of the cluster.

hosts Sequence[MdbSqlServerClusterHostArgs]

A host of the SQLServer cluster. The structure is documented below.

labels Mapping[str, str]

A set of key/value label pairs to assign to the SQLServer cluster.

name str

The name of the database.

network_id str

ID of the network, to which the SQLServer cluster uses.

resources MdbSqlServerClusterResourcesArgs

Resources allocated to hosts of the SQLServer cluster. The structure is documented below.

security_group_ids Sequence[str]

A set of ids of security groups assigned to hosts of the cluster.

sqlserver_config Mapping[str, str]

SQLServer cluster config. Detail info in "SQLServer config" section (documented below).

status str

Status of the cluster.

users Sequence[MdbSqlServerClusterUserArgs]

A user of the SQLServer cluster. The structure is documented below.

version str

Version of the SQLServer cluster. (2016sp2std, 2016sp2ent)

backupWindowStart Property Map

Time to start the daily backup, in the UTC. The structure is documented below.

createdAt String

Creation timestamp of the cluster.

databases List

A database of the SQLServer cluster. The structure is documented below.

deletionProtection Boolean

Inhibits deletion of the cluster. Can be either true or false.

description String

Description of the SQLServer cluster.

environment String

Deployment environment of the SQLServer cluster. (PRODUCTION, PRESTABLE)

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

Aggregated health of the cluster.

hostGroupIds List

A list of IDs of the host groups hosting VMs of the cluster.

hosts List

A host of the SQLServer cluster. The structure is documented below.

labels Map

A set of key/value label pairs to assign to the SQLServer cluster.

name String

The name of the database.

networkId String

ID of the network, to which the SQLServer cluster uses.

resources Property Map

Resources allocated to hosts of the SQLServer cluster. The structure is documented below.

securityGroupIds List

A set of ids of security groups assigned to hosts of the cluster.

sqlserverConfig Map

SQLServer cluster config. Detail info in "SQLServer config" section (documented below).

status String

Status of the cluster.

users List

A user of the SQLServer cluster. The structure is documented below.

version String

Version of the SQLServer cluster. (2016sp2std, 2016sp2ent)

Supporting Types

MdbSqlServerClusterBackupWindowStart

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 Integer

The hour at which backup will be started.

minutes Integer

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.

hours Number

The hour at which backup will be started.

minutes Number

The minute at which backup will be started.

MdbSqlServerClusterDatabase

Name string

The name of the database.

Name string

The name of the database.

name String

The name of the database.

name string

The name of the database.

name str

The name of the database.

name String

The name of the database.

MdbSqlServerClusterHost

Zone string

The availability zone where the SQLServer host will be created.

AssignPublicIp bool

Sets whether the host should get a public IP address on creation. Changing this parameter for an existing host is not supported at the moment

Fqdn string

The fully qualified domain name of the host.

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.

Zone string

The availability zone where the SQLServer host will be created.

AssignPublicIp bool

Sets whether the host should get a public IP address on creation. Changing this parameter for an existing host is not supported at the moment

Fqdn string

The fully qualified domain name of the host.

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.

zone String

The availability zone where the SQLServer host will be created.

assignPublicIp Boolean

Sets whether the host should get a public IP address on creation. Changing this parameter for an existing host is not supported at the moment

fqdn String

The fully qualified domain name of the host.

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.

zone string

The availability zone where the SQLServer host will be created.

assignPublicIp boolean

Sets whether the host should get a public IP address on creation. Changing this parameter for an existing host is not supported at the moment

fqdn string

The fully qualified domain name of the host.

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.

zone str

The availability zone where the SQLServer host will be created.

assign_public_ip bool

Sets whether the host should get a public IP address on creation. Changing this parameter for an existing host is not supported at the moment

fqdn str

The fully qualified domain name of the host.

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 String

The availability zone where the SQLServer host will be created.

assignPublicIp Boolean

Sets whether the host should get a public IP address on creation. Changing this parameter for an existing host is not supported at the moment

fqdn String

The fully qualified domain name of the host.

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.

MdbSqlServerClusterResources

DiskSize int

Volume of the storage available to a SQLServer host, in gigabytes.

DiskTypeId string

Type of the storage of SQLServer hosts.

ResourcePresetId string
DiskSize int

Volume of the storage available to a SQLServer host, in gigabytes.

DiskTypeId string

Type of the storage of SQLServer hosts.

ResourcePresetId string
diskSize Integer

Volume of the storage available to a SQLServer host, in gigabytes.

diskTypeId String

Type of the storage of SQLServer hosts.

resourcePresetId String
diskSize number

Volume of the storage available to a SQLServer host, in gigabytes.

diskTypeId string

Type of the storage of SQLServer hosts.

resourcePresetId string
disk_size int

Volume of the storage available to a SQLServer host, in gigabytes.

disk_type_id str

Type of the storage of SQLServer hosts.

resource_preset_id str
diskSize Number

Volume of the storage available to a SQLServer host, in gigabytes.

diskTypeId String

Type of the storage of SQLServer hosts.

resourcePresetId String

MdbSqlServerClusterUser

Name string

The name of the database.

Password string

The password of the user.

Permissions List<MdbSqlServerClusterUserPermission>

Set of permissions granted to the user. The structure is documented below.

Name string

The name of the database.

Password string

The password of the user.

Permissions []MdbSqlServerClusterUserPermission

Set of permissions granted to the user. The structure is documented below.

name String

The name of the database.

password String

The password of the user.

permissions ListSqlServerClusterUserPermission>

Set of permissions granted to the user. The structure is documented below.

name string

The name of the database.

password string

The password of the user.

permissions MdbSqlServerClusterUserPermission[]

Set of permissions granted to the user. The structure is documented below.

name str

The name of the database.

password str

The password of the user.

permissions Sequence[MdbSqlServerClusterUserPermission]

Set of permissions granted to the user. The structure is documented below.

name String

The name of the database.

password String

The password of the user.

permissions List

Set of permissions granted to the user. The structure is documented below.

MdbSqlServerClusterUserPermission

DatabaseName string

The name of the database that the permission grants access to.

Roles List<string>

List user's roles in the database. Allowed roles: OWNER, SECURITYADMIN, ACCESSADMIN, BACKUPOPERATOR, DDLADMIN, DATAWRITER, DATAREADER, DENYDATAWRITER, DENYDATAREADER.

DatabaseName string

The name of the database that the permission grants access to.

Roles []string

List user's roles in the database. Allowed roles: OWNER, SECURITYADMIN, ACCESSADMIN, BACKUPOPERATOR, DDLADMIN, DATAWRITER, DATAREADER, DENYDATAWRITER, DENYDATAREADER.

databaseName String

The name of the database that the permission grants access to.

roles List

List user's roles in the database. Allowed roles: OWNER, SECURITYADMIN, ACCESSADMIN, BACKUPOPERATOR, DDLADMIN, DATAWRITER, DATAREADER, DENYDATAWRITER, DENYDATAREADER.

databaseName string

The name of the database that the permission grants access to.

roles string[]

List user's roles in the database. Allowed roles: OWNER, SECURITYADMIN, ACCESSADMIN, BACKUPOPERATOR, DDLADMIN, DATAWRITER, DATAREADER, DENYDATAWRITER, DENYDATAREADER.

database_name str

The name of the database that the permission grants access to.

roles Sequence[str]

List user's roles in the database. Allowed roles: OWNER, SECURITYADMIN, ACCESSADMIN, BACKUPOPERATOR, DDLADMIN, DATAWRITER, DATAREADER, DENYDATAWRITER, DENYDATAREADER.

databaseName String

The name of the database that the permission grants access to.

roles List

List user's roles in the database. Allowed roles: OWNER, SECURITYADMIN, ACCESSADMIN, BACKUPOPERATOR, DDLADMIN, DATAWRITER, DATAREADER, DENYDATAWRITER, DENYDATAREADER.

Import

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

 $ pulumi import yandex:index/mdbSqlServerCluster:MdbSqlServerCluster 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.