MasterSlaveServerGroup

A master slave server group contains two ECS instances. The master slave server group can help you to define multiple listening dimension.

NOTE: One ECS instance can be added into multiple master slave server groups.

NOTE: One master slave server group can only add two ECS instances, which are master server and slave server.

NOTE: One master slave server group can be attached with tcp/udp listeners in one load balancer.

NOTE: One Classic and Internet load balancer, its master slave server group can add Classic and VPC ECS instances.

NOTE: One Classic and Intranet load balancer, its master slave server group can only add Classic ECS instances.

NOTE: One VPC load balancer, its master slave server group can only add the same VPC ECS instances.

NOTE: Available in 1.54.0+

Block servers

The servers mapping supports the following:

  • server_ids - (Required) A list backend server ID (ECS instance ID).
  • port - (Required) The port used by the backend server. Valid value range: [1-65535].
  • weight - (Optional) Weight of the backend server. Valid value range: [0-100]. Default to 100.
  • type - (Optional, Available in 1.51.0+) Type of the backend server. Valid value ecs, eni. Default to eni.
  • server_type - (Optional) The server type of the backend server. Valid value Master, Slave.
  • is_backup - (Removed from v1.63.0) Determine if the server is executing. Valid value 0, 1.

Example Usage

using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;

class MyStack : Stack
{
    public MyStack()
    {
        var defaultZones = Output.Create(AliCloud.GetZones.InvokeAsync(new AliCloud.GetZonesArgs
        {
            AvailableDiskCategory = "cloud_efficiency",
            AvailableResourceCreation = "VSwitch",
        }));
        var defaultInstanceTypes = defaultZones.Apply(defaultZones => Output.Create(AliCloud.Ecs.GetInstanceTypes.InvokeAsync(new AliCloud.Ecs.GetInstanceTypesArgs
        {
            AvailabilityZone = defaultZones.Zones?[0]?.Id,
            EniAmount = 2,
        })));
        var image = Output.Create(AliCloud.Ecs.GetImages.InvokeAsync(new AliCloud.Ecs.GetImagesArgs
        {
            NameRegex = "^ubuntu_18.*64",
            MostRecent = true,
            Owners = "system",
        }));
        var config = new Config();
        var name = config.Get("name") ?? "tf-testAccSlbMasterSlaveServerGroupVpc";
        var number = config.Get("number") ?? "1";
        var mainNetwork = new AliCloud.Vpc.Network("mainNetwork", new AliCloud.Vpc.NetworkArgs
        {
            CidrBlock = "172.16.0.0/16",
        });
        var mainSwitch = new AliCloud.Vpc.Switch("mainSwitch", new AliCloud.Vpc.SwitchArgs
        {
            VpcId = mainNetwork.Id,
            CidrBlock = "172.16.0.0/16",
            ZoneId = defaultZones.Apply(defaultZones => defaultZones.Zones?[0]?.Id),
            VswitchName = name,
        });
        var groupSecurityGroup = new AliCloud.Ecs.SecurityGroup("groupSecurityGroup", new AliCloud.Ecs.SecurityGroupArgs
        {
            VpcId = mainNetwork.Id,
        });
        var instanceInstance = new List<AliCloud.Ecs.Instance>();
        for (var rangeIndex = 0; rangeIndex < "2"; rangeIndex++)
        {
            var range = new { Value = rangeIndex };
            instanceInstance.Add(new AliCloud.Ecs.Instance($"instanceInstance-{range.Value}", new AliCloud.Ecs.InstanceArgs
            {
                ImageId = image.Apply(image => image.Images?[0]?.Id),
                InstanceType = defaultInstanceTypes.Apply(defaultInstanceTypes => defaultInstanceTypes.InstanceTypes?[0]?.Id),
                InstanceName = name,
                SecurityGroups = 
                {
                    groupSecurityGroup.Id,
                },
                InternetChargeType = "PayByTraffic",
                InternetMaxBandwidthOut = 10,
                AvailabilityZone = defaultZones.Apply(defaultZones => defaultZones.Zones?[0]?.Id),
                InstanceChargeType = "PostPaid",
                SystemDiskCategory = "cloud_efficiency",
                VswitchId = mainSwitch.Id,
            }));
        }
        var instanceApplicationLoadBalancer = new AliCloud.Slb.ApplicationLoadBalancer("instanceApplicationLoadBalancer", new AliCloud.Slb.ApplicationLoadBalancerArgs
        {
            LoadBalancerName = name,
            VswitchId = mainSwitch.Id,
            LoadBalancerSpec = "slb.s2.small",
        });
        var defaultNetworkInterface = new List<AliCloud.Vpc.NetworkInterface>();
        for (var rangeIndex = 0; rangeIndex < number; rangeIndex++)
        {
            var range = new { Value = rangeIndex };
            defaultNetworkInterface.Add(new AliCloud.Vpc.NetworkInterface($"defaultNetworkInterface-{range.Value}", new AliCloud.Vpc.NetworkInterfaceArgs
            {
                VswitchId = mainSwitch.Id,
                SecurityGroups = 
                {
                    groupSecurityGroup.Id,
                },
            }));
        }
        var defaultNetworkInterfaceAttachment = new List<AliCloud.Vpc.NetworkInterfaceAttachment>();
        for (var rangeIndex = 0; rangeIndex < number; rangeIndex++)
        {
            var range = new { Value = rangeIndex };
            defaultNetworkInterfaceAttachment.Add(new AliCloud.Vpc.NetworkInterfaceAttachment($"defaultNetworkInterfaceAttachment-{range.Value}", new AliCloud.Vpc.NetworkInterfaceAttachmentArgs
            {
                InstanceId = instanceInstance[0].Id,
                NetworkInterfaceId = defaultNetworkInterface.Select(__item => __item.Id).ToList()[range.Index],
            }));
        }
        var groupMasterSlaveServerGroup = new AliCloud.Slb.MasterSlaveServerGroup("groupMasterSlaveServerGroup", new AliCloud.Slb.MasterSlaveServerGroupArgs
        {
            LoadBalancerId = instanceApplicationLoadBalancer.Id,
            Servers = 
            {
                new AliCloud.Slb.Inputs.MasterSlaveServerGroupServerArgs
                {
                    ServerId = instanceInstance[0].Id,
                    Port = 100,
                    Weight = 100,
                    ServerType = "Master",
                },
                new AliCloud.Slb.Inputs.MasterSlaveServerGroupServerArgs
                {
                    ServerId = instanceInstance[1].Id,
                    Port = 100,
                    Weight = 100,
                    ServerType = "Slave",
                },
            },
        });
        var tcp = new AliCloud.Slb.Listener("tcp", new AliCloud.Slb.ListenerArgs
        {
            LoadBalancerId = instanceApplicationLoadBalancer.Id,
            MasterSlaveServerGroupId = groupMasterSlaveServerGroup.Id,
            FrontendPort = 22,
            Protocol = "tcp",
            Bandwidth = 10,
            HealthCheckType = "tcp",
            PersistenceTimeout = 3600,
            HealthyThreshold = 8,
            UnhealthyThreshold = 8,
            HealthCheckTimeout = 8,
            HealthCheckInterval = 5,
            HealthCheckHttpCode = "http_2xx",
            HealthCheckConnectPort = 20,
            HealthCheckUri = "/console",
            EstablishedTimeout = 600,
        });
    }

}

Coming soon!

package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.alicloud.AlicloudFunctions;
import com.pulumi.alicloud.adb.inputs.GetZonesArgs;
import com.pulumi.alicloud.ecs.EcsFunctions;
import com.pulumi.alicloud.ecp.inputs.GetInstanceTypesArgs;
import com.pulumi.alicloud.ecs.inputs.GetImagesArgs;
import com.pulumi.alicloud.vpc.Network;
import com.pulumi.alicloud.vpc.NetworkArgs;
import com.pulumi.alicloud.vpc.Switch;
import com.pulumi.alicloud.vpc.SwitchArgs;
import com.pulumi.alicloud.ecs.SecurityGroup;
import com.pulumi.alicloud.ecs.SecurityGroupArgs;
import com.pulumi.alicloud.ecs.Instance;
import com.pulumi.alicloud.ecs.InstanceArgs;
import com.pulumi.alicloud.slb.ApplicationLoadBalancer;
import com.pulumi.alicloud.slb.ApplicationLoadBalancerArgs;
import com.pulumi.alicloud.vpc.NetworkInterface;
import com.pulumi.alicloud.vpc.NetworkInterfaceArgs;
import com.pulumi.alicloud.vpc.NetworkInterfaceAttachment;
import com.pulumi.alicloud.vpc.NetworkInterfaceAttachmentArgs;
import com.pulumi.alicloud.slb.MasterSlaveServerGroup;
import com.pulumi.alicloud.slb.MasterSlaveServerGroupArgs;
import com.pulumi.alicloud.slb.inputs.MasterSlaveServerGroupServerArgs;
import com.pulumi.alicloud.slb.Listener;
import com.pulumi.alicloud.slb.ListenerArgs;
import com.pulumi.codegen.internal.KeyedValue;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        final var config = ctx.config();
        final var defaultZones = AlicloudFunctions.getZones(GetZonesArgs.builder()
            .availableDiskCategory("cloud_efficiency")
            .availableResourceCreation("VSwitch")
            .build());

        final var defaultInstanceTypes = EcsFunctions.getInstanceTypes(GetInstanceTypesArgs.builder()
            .availabilityZone(defaultZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
            .eniAmount(2)
            .build());

        final var image = EcsFunctions.getImages(GetImagesArgs.builder()
            .nameRegex("^ubuntu_18.*64")
            .mostRecent(true)
            .owners("system")
            .build());

        final var name = config.get("name").orElse("tf-testAccSlbMasterSlaveServerGroupVpc");
        final var number = config.get("number").orElse("1");
        var mainNetwork = new Network("mainNetwork", NetworkArgs.builder()        
            .cidrBlock("172.16.0.0/16")
            .build());

        var mainSwitch = new Switch("mainSwitch", SwitchArgs.builder()        
            .vpcId(mainNetwork.id())
            .cidrBlock("172.16.0.0/16")
            .zoneId(defaultZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
            .vswitchName(name)
            .build());

        var groupSecurityGroup = new SecurityGroup("groupSecurityGroup", SecurityGroupArgs.builder()        
            .vpcId(mainNetwork.id())
            .build());

        for (var i = 0; i < "2"; i++) {
            new Instance("instanceInstance-" + i, InstanceArgs.builder()            
                .imageId(image.applyValue(getImagesResult -> getImagesResult.images()[0].id()))
                .instanceType(defaultInstanceTypes.applyValue(getInstanceTypesResult -> getInstanceTypesResult.instanceTypes()[0].id()))
                .instanceName(name)
                .securityGroups(groupSecurityGroup.id())
                .internetChargeType("PayByTraffic")
                .internetMaxBandwidthOut("10")
                .availabilityZone(defaultZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
                .instanceChargeType("PostPaid")
                .systemDiskCategory("cloud_efficiency")
                .vswitchId(mainSwitch.id())
                .build());

        
}
        var instanceApplicationLoadBalancer = new ApplicationLoadBalancer("instanceApplicationLoadBalancer", ApplicationLoadBalancerArgs.builder()        
            .loadBalancerName(name)
            .vswitchId(mainSwitch.id())
            .loadBalancerSpec("slb.s2.small")
            .build());

        for (var i = 0; i < number; i++) {
            new NetworkInterface("defaultNetworkInterface-" + i, NetworkInterfaceArgs.builder()            
                .vswitchId(mainSwitch.id())
                .securityGroups(groupSecurityGroup.id())
                .build());

        
}
        for (var i = 0; i < number; i++) {
            new NetworkInterfaceAttachment("defaultNetworkInterfaceAttachment-" + i, NetworkInterfaceAttachmentArgs.builder()            
                .instanceId(instanceInstance[0].id())
                .networkInterfaceId(defaultNetworkInterface.stream().map(element -> element.id()).collect(toList())[range.index()])
                .build());

        
}
        var groupMasterSlaveServerGroup = new MasterSlaveServerGroup("groupMasterSlaveServerGroup", MasterSlaveServerGroupArgs.builder()        
            .loadBalancerId(instanceApplicationLoadBalancer.id())
            .servers(            
                MasterSlaveServerGroupServerArgs.builder()
                    .serverId(instanceInstance[0].id())
                    .port(100)
                    .weight(100)
                    .serverType("Master")
                    .build(),
                MasterSlaveServerGroupServerArgs.builder()
                    .serverId(instanceInstance[1].id())
                    .port(100)
                    .weight(100)
                    .serverType("Slave")
                    .build())
            .build());

        var tcp = new Listener("tcp", ListenerArgs.builder()        
            .loadBalancerId(instanceApplicationLoadBalancer.id())
            .masterSlaveServerGroupId(groupMasterSlaveServerGroup.id())
            .frontendPort("22")
            .protocol("tcp")
            .bandwidth("10")
            .healthCheckType("tcp")
            .persistenceTimeout(3600)
            .healthyThreshold(8)
            .unhealthyThreshold(8)
            .healthCheckTimeout(8)
            .healthCheckInterval(5)
            .healthCheckHttpCode("http_2xx")
            .healthCheckConnectPort(20)
            .healthCheckUri("/console")
            .establishedTimeout(600)
            .build());

    }
}
import pulumi
import pulumi_alicloud as alicloud

default_zones = alicloud.get_zones(available_disk_category="cloud_efficiency",
    available_resource_creation="VSwitch")
default_instance_types = alicloud.ecs.get_instance_types(availability_zone=default_zones.zones[0].id,
    eni_amount=2)
image = alicloud.ecs.get_images(name_regex="^ubuntu_18.*64",
    most_recent=True,
    owners="system")
config = pulumi.Config()
name = config.get("name")
if name is None:
    name = "tf-testAccSlbMasterSlaveServerGroupVpc"
number = config.get("number")
if number is None:
    number = "1"
main_network = alicloud.vpc.Network("mainNetwork", cidr_block="172.16.0.0/16")
main_switch = alicloud.vpc.Switch("mainSwitch",
    vpc_id=main_network.id,
    cidr_block="172.16.0.0/16",
    zone_id=default_zones.zones[0].id,
    vswitch_name=name)
group_security_group = alicloud.ecs.SecurityGroup("groupSecurityGroup", vpc_id=main_network.id)
instance_instance = []
for range in [{"value": i} for i in range(0, 2)]:
    instance_instance.append(alicloud.ecs.Instance(f"instanceInstance-{range['value']}",
        image_id=image.images[0].id,
        instance_type=default_instance_types.instance_types[0].id,
        instance_name=name,
        security_groups=[group_security_group.id],
        internet_charge_type="PayByTraffic",
        internet_max_bandwidth_out=10,
        availability_zone=default_zones.zones[0].id,
        instance_charge_type="PostPaid",
        system_disk_category="cloud_efficiency",
        vswitch_id=main_switch.id))
instance_application_load_balancer = alicloud.slb.ApplicationLoadBalancer("instanceApplicationLoadBalancer",
    load_balancer_name=name,
    vswitch_id=main_switch.id,
    load_balancer_spec="slb.s2.small")
default_network_interface = []
for range in [{"value": i} for i in range(0, number)]:
    default_network_interface.append(alicloud.vpc.NetworkInterface(f"defaultNetworkInterface-{range['value']}",
        vswitch_id=main_switch.id,
        security_groups=[group_security_group.id]))
default_network_interface_attachment = []
for range in [{"value": i} for i in range(0, number)]:
    default_network_interface_attachment.append(alicloud.vpc.NetworkInterfaceAttachment(f"defaultNetworkInterfaceAttachment-{range['value']}",
        instance_id=instance_instance[0].id,
        network_interface_id=[__item.id for __item in default_network_interface][range["index"]]))
group_master_slave_server_group = alicloud.slb.MasterSlaveServerGroup("groupMasterSlaveServerGroup",
    load_balancer_id=instance_application_load_balancer.id,
    servers=[
        alicloud.slb.MasterSlaveServerGroupServerArgs(
            server_id=instance_instance[0].id,
            port=100,
            weight=100,
            server_type="Master",
        ),
        alicloud.slb.MasterSlaveServerGroupServerArgs(
            server_id=instance_instance[1].id,
            port=100,
            weight=100,
            server_type="Slave",
        ),
    ])
tcp = alicloud.slb.Listener("tcp",
    load_balancer_id=instance_application_load_balancer.id,
    master_slave_server_group_id=group_master_slave_server_group.id,
    frontend_port=22,
    protocol="tcp",
    bandwidth=10,
    health_check_type="tcp",
    persistence_timeout=3600,
    healthy_threshold=8,
    unhealthy_threshold=8,
    health_check_timeout=8,
    health_check_interval=5,
    health_check_http_code="http_2xx",
    health_check_connect_port=20,
    health_check_uri="/console",
    established_timeout=600)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const defaultZones = alicloud.getZones({
    availableDiskCategory: "cloud_efficiency",
    availableResourceCreation: "VSwitch",
});
const defaultInstanceTypes = defaultZones.then(defaultZones => alicloud.ecs.getInstanceTypes({
    availabilityZone: defaultZones.zones?[0]?.id,
    eniAmount: 2,
}));
const image = alicloud.ecs.getImages({
    nameRegex: "^ubuntu_18.*64",
    mostRecent: true,
    owners: "system",
});
const config = new pulumi.Config();
const name = config.get("name") || "tf-testAccSlbMasterSlaveServerGroupVpc";
const number = config.get("number") || "1";
const mainNetwork = new alicloud.vpc.Network("mainNetwork", {cidrBlock: "172.16.0.0/16"});
const mainSwitch = new alicloud.vpc.Switch("mainSwitch", {
    vpcId: mainNetwork.id,
    cidrBlock: "172.16.0.0/16",
    zoneId: defaultZones.then(defaultZones => defaultZones.zones?[0]?.id),
    vswitchName: name,
});
const groupSecurityGroup = new alicloud.ecs.SecurityGroup("groupSecurityGroup", {vpcId: mainNetwork.id});
const instanceInstance: alicloud.ecs.Instance[];
for (const range = {value: 0}; range.value < "2"; range.value++) {
    instanceInstance.push(new alicloud.ecs.Instance(`instanceInstance-${range.value}`, {
        imageId: image.then(image => image.images?[0]?.id),
        instanceType: defaultInstanceTypes.then(defaultInstanceTypes => defaultInstanceTypes.instanceTypes?[0]?.id),
        instanceName: name,
        securityGroups: [groupSecurityGroup.id],
        internetChargeType: "PayByTraffic",
        internetMaxBandwidthOut: 10,
        availabilityZone: defaultZones.then(defaultZones => defaultZones.zones?[0]?.id),
        instanceChargeType: "PostPaid",
        systemDiskCategory: "cloud_efficiency",
        vswitchId: mainSwitch.id,
    }));
}
const instanceApplicationLoadBalancer = new alicloud.slb.ApplicationLoadBalancer("instanceApplicationLoadBalancer", {
    loadBalancerName: name,
    vswitchId: mainSwitch.id,
    loadBalancerSpec: "slb.s2.small",
});
const defaultNetworkInterface: alicloud.vpc.NetworkInterface[];
for (const range = {value: 0}; range.value < number; range.value++) {
    defaultNetworkInterface.push(new alicloud.vpc.NetworkInterface(`defaultNetworkInterface-${range.value}`, {
        vswitchId: mainSwitch.id,
        securityGroups: [groupSecurityGroup.id],
    }));
}
const defaultNetworkInterfaceAttachment: alicloud.vpc.NetworkInterfaceAttachment[];
for (const range = {value: 0}; range.value < number; range.value++) {
    defaultNetworkInterfaceAttachment.push(new alicloud.vpc.NetworkInterfaceAttachment(`defaultNetworkInterfaceAttachment-${range.value}`, {
        instanceId: instanceInstance[0].id,
        networkInterfaceId: defaultNetworkInterface.map(__item => __item.id)[range.index],
    }));
}
const groupMasterSlaveServerGroup = new alicloud.slb.MasterSlaveServerGroup("groupMasterSlaveServerGroup", {
    loadBalancerId: instanceApplicationLoadBalancer.id,
    servers: [
        {
            serverId: instanceInstance[0].id,
            port: 100,
            weight: 100,
            serverType: "Master",
        },
        {
            serverId: instanceInstance[1].id,
            port: 100,
            weight: 100,
            serverType: "Slave",
        },
    ],
});
const tcp = new alicloud.slb.Listener("tcp", {
    loadBalancerId: instanceApplicationLoadBalancer.id,
    masterSlaveServerGroupId: groupMasterSlaveServerGroup.id,
    frontendPort: 22,
    protocol: "tcp",
    bandwidth: 10,
    healthCheckType: "tcp",
    persistenceTimeout: 3600,
    healthyThreshold: 8,
    unhealthyThreshold: 8,
    healthCheckTimeout: 8,
    healthCheckInterval: 5,
    healthCheckHttpCode: "http_2xx",
    healthCheckConnectPort: 20,
    healthCheckUri: "/console",
    establishedTimeout: 600,
});

Coming soon!

Create MasterSlaveServerGroup Resource

new MasterSlaveServerGroup(name: string, args: MasterSlaveServerGroupArgs, opts?: CustomResourceOptions);
@overload
def MasterSlaveServerGroup(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           delete_protection_validation: Optional[bool] = None,
                           load_balancer_id: Optional[str] = None,
                           name: Optional[str] = None,
                           servers: Optional[Sequence[MasterSlaveServerGroupServerArgs]] = None)
@overload
def MasterSlaveServerGroup(resource_name: str,
                           args: MasterSlaveServerGroupArgs,
                           opts: Optional[ResourceOptions] = None)
func NewMasterSlaveServerGroup(ctx *Context, name string, args MasterSlaveServerGroupArgs, opts ...ResourceOption) (*MasterSlaveServerGroup, error)
public MasterSlaveServerGroup(string name, MasterSlaveServerGroupArgs args, CustomResourceOptions? opts = null)
public MasterSlaveServerGroup(String name, MasterSlaveServerGroupArgs args)
public MasterSlaveServerGroup(String name, MasterSlaveServerGroupArgs args, CustomResourceOptions options)
type: alicloud:slb:MasterSlaveServerGroup
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

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

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

LoadBalancerId string

The Load Balancer ID which is used to launch a new master slave server group.

DeleteProtectionValidation bool

Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.

Name string

Name of the master slave server group.

Servers List<Pulumi.AliCloud.Slb.Inputs.MasterSlaveServerGroupServerArgs>

A list of ECS instances to be added. Only two ECS instances can be supported in one resource. It contains six sub-fields as Block server follows.

LoadBalancerId string

The Load Balancer ID which is used to launch a new master slave server group.

DeleteProtectionValidation bool

Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.

Name string

Name of the master slave server group.

Servers []MasterSlaveServerGroupServerArgs

A list of ECS instances to be added. Only two ECS instances can be supported in one resource. It contains six sub-fields as Block server follows.

loadBalancerId String

The Load Balancer ID which is used to launch a new master slave server group.

deleteProtectionValidation Boolean

Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.

name String

Name of the master slave server group.

servers List<MasterSlaveServerGroupServerArgs>

A list of ECS instances to be added. Only two ECS instances can be supported in one resource. It contains six sub-fields as Block server follows.

loadBalancerId string

The Load Balancer ID which is used to launch a new master slave server group.

deleteProtectionValidation boolean

Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.

name string

Name of the master slave server group.

servers MasterSlaveServerGroupServerArgs[]

A list of ECS instances to be added. Only two ECS instances can be supported in one resource. It contains six sub-fields as Block server follows.

load_balancer_id str

The Load Balancer ID which is used to launch a new master slave server group.

delete_protection_validation bool

Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.

name str

Name of the master slave server group.

servers Sequence[MasterSlaveServerGroupServerArgs]

A list of ECS instances to be added. Only two ECS instances can be supported in one resource. It contains six sub-fields as Block server follows.

loadBalancerId String

The Load Balancer ID which is used to launch a new master slave server group.

deleteProtectionValidation Boolean

Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.

name String

Name of the master slave server group.

servers List<Property Map>

A list of ECS instances to be added. Only two ECS instances can be supported in one resource. It contains six sub-fields as Block server follows.

Outputs

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

Id string

The provider-assigned unique ID for this managed resource.

Id string

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

id string

The provider-assigned unique ID for this managed resource.

id str

The provider-assigned unique ID for this managed resource.

id String

The provider-assigned unique ID for this managed resource.

Look up Existing MasterSlaveServerGroup Resource

Get an existing MasterSlaveServerGroup 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?: MasterSlaveServerGroupState, opts?: CustomResourceOptions): MasterSlaveServerGroup
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        delete_protection_validation: Optional[bool] = None,
        load_balancer_id: Optional[str] = None,
        name: Optional[str] = None,
        servers: Optional[Sequence[MasterSlaveServerGroupServerArgs]] = None) -> MasterSlaveServerGroup
func GetMasterSlaveServerGroup(ctx *Context, name string, id IDInput, state *MasterSlaveServerGroupState, opts ...ResourceOption) (*MasterSlaveServerGroup, error)
public static MasterSlaveServerGroup Get(string name, Input<string> id, MasterSlaveServerGroupState? state, CustomResourceOptions? opts = null)
public static MasterSlaveServerGroup get(String name, Output<String> id, MasterSlaveServerGroupState 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:
DeleteProtectionValidation bool

Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.

LoadBalancerId string

The Load Balancer ID which is used to launch a new master slave server group.

Name string

Name of the master slave server group.

Servers List<Pulumi.AliCloud.Slb.Inputs.MasterSlaveServerGroupServerArgs>

A list of ECS instances to be added. Only two ECS instances can be supported in one resource. It contains six sub-fields as Block server follows.

DeleteProtectionValidation bool

Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.

LoadBalancerId string

The Load Balancer ID which is used to launch a new master slave server group.

Name string

Name of the master slave server group.

Servers []MasterSlaveServerGroupServerArgs

A list of ECS instances to be added. Only two ECS instances can be supported in one resource. It contains six sub-fields as Block server follows.

deleteProtectionValidation Boolean

Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.

loadBalancerId String

The Load Balancer ID which is used to launch a new master slave server group.

name String

Name of the master slave server group.

servers List<MasterSlaveServerGroupServerArgs>

A list of ECS instances to be added. Only two ECS instances can be supported in one resource. It contains six sub-fields as Block server follows.

deleteProtectionValidation boolean

Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.

loadBalancerId string

The Load Balancer ID which is used to launch a new master slave server group.

name string

Name of the master slave server group.

servers MasterSlaveServerGroupServerArgs[]

A list of ECS instances to be added. Only two ECS instances can be supported in one resource. It contains six sub-fields as Block server follows.

delete_protection_validation bool

Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.

load_balancer_id str

The Load Balancer ID which is used to launch a new master slave server group.

name str

Name of the master slave server group.

servers Sequence[MasterSlaveServerGroupServerArgs]

A list of ECS instances to be added. Only two ECS instances can be supported in one resource. It contains six sub-fields as Block server follows.

deleteProtectionValidation Boolean

Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.

loadBalancerId String

The Load Balancer ID which is used to launch a new master slave server group.

name String

Name of the master slave server group.

servers List<Property Map>

A list of ECS instances to be added. Only two ECS instances can be supported in one resource. It contains six sub-fields as Block server follows.

Supporting Types

MasterSlaveServerGroupServer

Port int
ServerId string
IsBackup int
ServerType string
Type string
Weight int
Port int
ServerId string
IsBackup int
ServerType string
Type string
Weight int
port Integer
serverId String
isBackup Integer
serverType String
type String
weight Integer
port number
serverId string
isBackup number
serverType string
type string
weight number
port Number
serverId String
isBackup Number
serverType String
type String
weight Number

Import

Load balancer master slave server group can be imported using the id, e.g.

 $ pulumi import alicloud:slb/masterSlaveServerGroup:MasterSlaveServerGroup example abc123456

Package Details

Repository
https://github.com/pulumi/pulumi-alicloud
License
Apache-2.0
Notes

This Pulumi package is based on the alicloud Terraform Provider.