ServerGroupServerAttachment

NOTE: Available in v1.163.0+.

For information about server group server attachment and how to use it, see Configure a server group server attachment.

Example Usage

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

class MyStack : Stack
{
    public MyStack()
    {
        var config = new Config();
        var name = config.Get("name") ?? "slbservergroupvpc";
        var num = config.GetNumber("num") ?? 5;
        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,
            CpuCoreCount = 1,
            MemorySize = 2,
        })));
        var defaultImages = Output.Create(AliCloud.Ecs.GetImages.InvokeAsync(new AliCloud.Ecs.GetImagesArgs
        {
            NameRegex = "^ubuntu_[0-9]+_[0-9]+_x64*",
            MostRecent = true,
            Owners = "system",
        }));
        var defaultNetworks = Output.Create(AliCloud.Vpc.GetNetworks.InvokeAsync(new AliCloud.Vpc.GetNetworksArgs
        {
            NameRegex = "default-NODELETING",
        }));
        var defaultSwitches = Output.Tuple(defaultNetworks, defaultZones).Apply(values =>
        {
            var defaultNetworks = values.Item1;
            var defaultZones = values.Item2;
            return Output.Create(AliCloud.Vpc.GetSwitches.InvokeAsync(new AliCloud.Vpc.GetSwitchesArgs
            {
                VpcId = defaultNetworks.Ids?[0],
                ZoneId = defaultZones.Zones?[0]?.Id,
            }));
        });
        var defaultSecurityGroup = new AliCloud.Ecs.SecurityGroup("defaultSecurityGroup", new AliCloud.Ecs.SecurityGroupArgs
        {
            VpcId = defaultNetworks.Apply(defaultNetworks => defaultNetworks.Ids?[0]),
        });
        var defaultInstance = new List<AliCloud.Ecs.Instance>();
        for (var rangeIndex = 0; rangeIndex < num; rangeIndex++)
        {
            var range = new { Value = rangeIndex };
            defaultInstance.Add(new AliCloud.Ecs.Instance($"defaultInstance-{range.Value}", new AliCloud.Ecs.InstanceArgs
            {
                ImageId = defaultImages.Apply(defaultImages => defaultImages.Images?[0]?.Id),
                InstanceType = defaultInstanceTypes.Apply(defaultInstanceTypes => defaultInstanceTypes.InstanceTypes?[0]?.Id),
                InstanceName = name,
                SecurityGroups = 
                {
                    defaultSecurityGroup,
                }.Select(__item => __item.Id).ToList(),
                InternetChargeType = "PayByTraffic",
                InternetMaxBandwidthOut = 10,
                AvailabilityZone = defaultZones.Apply(defaultZones => defaultZones.Zones?[0]?.Id),
                InstanceChargeType = "PostPaid",
                SystemDiskCategory = "cloud_efficiency",
                VswitchId = defaultSwitches.Apply(defaultSwitches => defaultSwitches.Ids?[0]),
            }));
        }
        var defaultApplicationLoadBalancer = new AliCloud.Slb.ApplicationLoadBalancer("defaultApplicationLoadBalancer", new AliCloud.Slb.ApplicationLoadBalancerArgs
        {
            LoadBalancerName = name,
            VswitchId = defaultSwitches.Apply(defaultSwitches => defaultSwitches.Vswitches?[0]?.Id),
            LoadBalancerSpec = "slb.s2.small",
            AddressType = "intranet",
        });
        var defaultServerGroup = new AliCloud.Slb.ServerGroup("defaultServerGroup", new AliCloud.Slb.ServerGroupArgs
        {
            LoadBalancerId = defaultApplicationLoadBalancer.Id,
        });
        var defaultServerGroupServerAttachment = new List<AliCloud.Slb.ServerGroupServerAttachment>();
        for (var rangeIndex = 0; rangeIndex < num; rangeIndex++)
        {
            var range = new { Value = rangeIndex };
            defaultServerGroupServerAttachment.Add(new AliCloud.Slb.ServerGroupServerAttachment($"defaultServerGroupServerAttachment-{range.Value}", new AliCloud.Slb.ServerGroupServerAttachmentArgs
            {
                ServerGroupId = defaultServerGroup.Id,
                ServerId = defaultInstance[range.Index].Id,
                Port = 8080,
                Weight = 0,
            }));
        }
        var defaultListener = new AliCloud.Slb.Listener("defaultListener", new AliCloud.Slb.ListenerArgs
        {
            LoadBalancerId = defaultApplicationLoadBalancer.Id,
            BackendPort = 80,
            FrontendPort = 80,
            Protocol = "tcp",
            Bandwidth = 10,
            Scheduler = "rr",
            ServerGroupId = defaultServerGroup.Id,
        });
    }

}

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.VpcFunctions;
import com.pulumi.alicloud.cloudconnect.inputs.GetNetworksArgs;
import com.pulumi.alicloud.vpc.inputs.GetSwitchesArgs;
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.slb.ServerGroup;
import com.pulumi.alicloud.slb.ServerGroupArgs;
import com.pulumi.alicloud.slb.ServerGroupServerAttachment;
import com.pulumi.alicloud.slb.ServerGroupServerAttachmentArgs;
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 name = config.get("name").orElse("slbservergroupvpc");
        final var num = config.get("num").orElse(5);
        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()))
            .cpuCoreCount(1)
            .memorySize(2)
            .build());

        final var defaultImages = EcsFunctions.getImages(GetImagesArgs.builder()
            .nameRegex("^ubuntu_[0-9]+_[0-9]+_x64*")
            .mostRecent(true)
            .owners("system")
            .build());

        final var defaultNetworks = VpcFunctions.getNetworks(GetNetworksArgs.builder()
            .nameRegex("default-NODELETING")
            .build());

        final var defaultSwitches = VpcFunctions.getSwitches(GetSwitchesArgs.builder()
            .vpcId(defaultNetworks.applyValue(getNetworksResult -> getNetworksResult.ids()[0]))
            .zoneId(defaultZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
            .build());

        var defaultSecurityGroup = new SecurityGroup("defaultSecurityGroup", SecurityGroupArgs.builder()        
            .vpcId(defaultNetworks.applyValue(getNetworksResult -> getNetworksResult.ids()[0]))
            .build());

        for (var i = 0; i < num; i++) {
            new Instance("defaultInstance-" + i, InstanceArgs.builder()            
                .imageId(defaultImages.applyValue(getImagesResult -> getImagesResult.images()[0].id()))
                .instanceType(defaultInstanceTypes.applyValue(getInstanceTypesResult -> getInstanceTypesResult.instanceTypes()[0].id()))
                .instanceName(name)
                .securityGroups(defaultSecurityGroup.stream().map(element -> element.id()).collect(toList()))
                .internetChargeType("PayByTraffic")
                .internetMaxBandwidthOut("10")
                .availabilityZone(defaultZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
                .instanceChargeType("PostPaid")
                .systemDiskCategory("cloud_efficiency")
                .vswitchId(defaultSwitches.applyValue(getSwitchesResult -> getSwitchesResult.ids()[0]))
                .build());

        
}
        var defaultApplicationLoadBalancer = new ApplicationLoadBalancer("defaultApplicationLoadBalancer", ApplicationLoadBalancerArgs.builder()        
            .loadBalancerName(name)
            .vswitchId(defaultSwitches.applyValue(getSwitchesResult -> getSwitchesResult.vswitches()[0].id()))
            .loadBalancerSpec("slb.s2.small")
            .addressType("intranet")
            .build());

        var defaultServerGroup = new ServerGroup("defaultServerGroup", ServerGroupArgs.builder()        
            .loadBalancerId(defaultApplicationLoadBalancer.id())
            .build());

        for (var i = 0; i < num; i++) {
            new ServerGroupServerAttachment("defaultServerGroupServerAttachment-" + i, ServerGroupServerAttachmentArgs.builder()            
                .serverGroupId(defaultServerGroup.id())
                .serverId(defaultInstance[range.index()].id())
                .port(8080)
                .weight(0)
                .build());

        
}
        var defaultListener = new Listener("defaultListener", ListenerArgs.builder()        
            .loadBalancerId(defaultApplicationLoadBalancer.id())
            .backendPort("80")
            .frontendPort("80")
            .protocol("tcp")
            .bandwidth(10)
            .scheduler("rr")
            .serverGroupId(defaultServerGroup.id())
            .build());

    }
}
import pulumi
import pulumi_alicloud as alicloud

config = pulumi.Config()
name = config.get("name")
if name is None:
    name = "slbservergroupvpc"
num = config.get_float("num")
if num is None:
    num = 5
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,
    cpu_core_count=1,
    memory_size=2)
default_images = alicloud.ecs.get_images(name_regex="^ubuntu_[0-9]+_[0-9]+_x64*",
    most_recent=True,
    owners="system")
default_networks = alicloud.vpc.get_networks(name_regex="default-NODELETING")
default_switches = alicloud.vpc.get_switches(vpc_id=default_networks.ids[0],
    zone_id=default_zones.zones[0].id)
default_security_group = alicloud.ecs.SecurityGroup("defaultSecurityGroup", vpc_id=default_networks.ids[0])
default_instance = []
for range in [{"value": i} for i in range(0, num)]:
    default_instance.append(alicloud.ecs.Instance(f"defaultInstance-{range['value']}",
        image_id=default_images.images[0].id,
        instance_type=default_instance_types.instance_types[0].id,
        instance_name=name,
        security_groups=[__item.id for __item in [default_security_group]],
        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=default_switches.ids[0]))
default_application_load_balancer = alicloud.slb.ApplicationLoadBalancer("defaultApplicationLoadBalancer",
    load_balancer_name=name,
    vswitch_id=default_switches.vswitches[0].id,
    load_balancer_spec="slb.s2.small",
    address_type="intranet")
default_server_group = alicloud.slb.ServerGroup("defaultServerGroup", load_balancer_id=default_application_load_balancer.id)
default_server_group_server_attachment = []
for range in [{"value": i} for i in range(0, num)]:
    default_server_group_server_attachment.append(alicloud.slb.ServerGroupServerAttachment(f"defaultServerGroupServerAttachment-{range['value']}",
        server_group_id=default_server_group.id,
        server_id=default_instance[range["index"]].id,
        port=8080,
        weight=0))
default_listener = alicloud.slb.Listener("defaultListener",
    load_balancer_id=default_application_load_balancer.id,
    backend_port=80,
    frontend_port=80,
    protocol="tcp",
    bandwidth=10,
    scheduler="rr",
    server_group_id=default_server_group.id)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";

const config = new pulumi.Config();
const name = config.get("name") || "slbservergroupvpc";
const num = config.getNumber("num") || 5;
const defaultZones = alicloud.getZones({
    availableDiskCategory: "cloud_efficiency",
    availableResourceCreation: "VSwitch",
});
const defaultInstanceTypes = defaultZones.then(defaultZones => alicloud.ecs.getInstanceTypes({
    availabilityZone: defaultZones.zones?[0]?.id,
    cpuCoreCount: 1,
    memorySize: 2,
}));
const defaultImages = alicloud.ecs.getImages({
    nameRegex: "^ubuntu_[0-9]+_[0-9]+_x64*",
    mostRecent: true,
    owners: "system",
});
const defaultNetworks = alicloud.vpc.getNetworks({
    nameRegex: "default-NODELETING",
});
const defaultSwitches = Promise.all([defaultNetworks, defaultZones]).then(([defaultNetworks, defaultZones]) => alicloud.vpc.getSwitches({
    vpcId: defaultNetworks.ids?[0],
    zoneId: defaultZones.zones?[0]?.id,
}));
const defaultSecurityGroup = new alicloud.ecs.SecurityGroup("defaultSecurityGroup", {vpcId: defaultNetworks.then(defaultNetworks => defaultNetworks.ids?[0])});
const defaultInstance: alicloud.ecs.Instance[];
for (const range = {value: 0}; range.value < num; range.value++) {
    defaultInstance.push(new alicloud.ecs.Instance(`defaultInstance-${range.value}`, {
        imageId: defaultImages.then(defaultImages => defaultImages.images?[0]?.id),
        instanceType: defaultInstanceTypes.then(defaultInstanceTypes => defaultInstanceTypes.instanceTypes?[0]?.id),
        instanceName: name,
        securityGroups: [defaultSecurityGroup].map(__item => __item.id),
        internetChargeType: "PayByTraffic",
        internetMaxBandwidthOut: 10,
        availabilityZone: defaultZones.then(defaultZones => defaultZones.zones?[0]?.id),
        instanceChargeType: "PostPaid",
        systemDiskCategory: "cloud_efficiency",
        vswitchId: defaultSwitches.then(defaultSwitches => defaultSwitches.ids?[0]),
    }));
}
const defaultApplicationLoadBalancer = new alicloud.slb.ApplicationLoadBalancer("defaultApplicationLoadBalancer", {
    loadBalancerName: name,
    vswitchId: defaultSwitches.then(defaultSwitches => defaultSwitches.vswitches?[0]?.id),
    loadBalancerSpec: "slb.s2.small",
    addressType: "intranet",
});
const defaultServerGroup = new alicloud.slb.ServerGroup("defaultServerGroup", {loadBalancerId: defaultApplicationLoadBalancer.id});
const defaultServerGroupServerAttachment: alicloud.slb.ServerGroupServerAttachment[];
for (const range = {value: 0}; range.value < num; range.value++) {
    defaultServerGroupServerAttachment.push(new alicloud.slb.ServerGroupServerAttachment(`defaultServerGroupServerAttachment-${range.value}`, {
        serverGroupId: defaultServerGroup.id,
        serverId: defaultInstance[range.index].id,
        port: 8080,
        weight: 0,
    }));
}
const defaultListener = new alicloud.slb.Listener("defaultListener", {
    loadBalancerId: defaultApplicationLoadBalancer.id,
    backendPort: 80,
    frontendPort: 80,
    protocol: "tcp",
    bandwidth: 10,
    scheduler: "rr",
    serverGroupId: defaultServerGroup.id,
});

Coming soon!

Create ServerGroupServerAttachment Resource

new ServerGroupServerAttachment(name: string, args: ServerGroupServerAttachmentArgs, opts?: CustomResourceOptions);
@overload
def ServerGroupServerAttachment(resource_name: str,
                                opts: Optional[ResourceOptions] = None,
                                description: Optional[str] = None,
                                port: Optional[int] = None,
                                server_group_id: Optional[str] = None,
                                server_id: Optional[str] = None,
                                type: Optional[str] = None,
                                weight: Optional[int] = None)
@overload
def ServerGroupServerAttachment(resource_name: str,
                                args: ServerGroupServerAttachmentArgs,
                                opts: Optional[ResourceOptions] = None)
func NewServerGroupServerAttachment(ctx *Context, name string, args ServerGroupServerAttachmentArgs, opts ...ResourceOption) (*ServerGroupServerAttachment, error)
public ServerGroupServerAttachment(string name, ServerGroupServerAttachmentArgs args, CustomResourceOptions? opts = null)
public ServerGroupServerAttachment(String name, ServerGroupServerAttachmentArgs args)
public ServerGroupServerAttachment(String name, ServerGroupServerAttachmentArgs args, CustomResourceOptions options)
type: alicloud:slb:ServerGroupServerAttachment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

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

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

Port int

The port that is used by the backend server. Valid values: 1 to 65535.

ServerGroupId string

The ID of the server group.

ServerId string

The ID of the backend server. You can specify the ID of an Elastic Compute Service (ECS) instance or an elastic network interface (ENI).

Description string

The description of the backend server.

Type string

The type of backend server. Valid values: ecs, eni.

Weight int

The weight of the backend server. Valid values: 0 to 100. Default value: 100. If the value is set to 0, no requests are forwarded to the backend server.

Port int

The port that is used by the backend server. Valid values: 1 to 65535.

ServerGroupId string

The ID of the server group.

ServerId string

The ID of the backend server. You can specify the ID of an Elastic Compute Service (ECS) instance or an elastic network interface (ENI).

Description string

The description of the backend server.

Type string

The type of backend server. Valid values: ecs, eni.

Weight int

The weight of the backend server. Valid values: 0 to 100. Default value: 100. If the value is set to 0, no requests are forwarded to the backend server.

port Integer

The port that is used by the backend server. Valid values: 1 to 65535.

serverGroupId String

The ID of the server group.

serverId String

The ID of the backend server. You can specify the ID of an Elastic Compute Service (ECS) instance or an elastic network interface (ENI).

description String

The description of the backend server.

type String

The type of backend server. Valid values: ecs, eni.

weight Integer

The weight of the backend server. Valid values: 0 to 100. Default value: 100. If the value is set to 0, no requests are forwarded to the backend server.

port number

The port that is used by the backend server. Valid values: 1 to 65535.

serverGroupId string

The ID of the server group.

serverId string

The ID of the backend server. You can specify the ID of an Elastic Compute Service (ECS) instance or an elastic network interface (ENI).

description string

The description of the backend server.

type string

The type of backend server. Valid values: ecs, eni.

weight number

The weight of the backend server. Valid values: 0 to 100. Default value: 100. If the value is set to 0, no requests are forwarded to the backend server.

port int

The port that is used by the backend server. Valid values: 1 to 65535.

server_group_id str

The ID of the server group.

server_id str

The ID of the backend server. You can specify the ID of an Elastic Compute Service (ECS) instance or an elastic network interface (ENI).

description str

The description of the backend server.

type str

The type of backend server. Valid values: ecs, eni.

weight int

The weight of the backend server. Valid values: 0 to 100. Default value: 100. If the value is set to 0, no requests are forwarded to the backend server.

port Number

The port that is used by the backend server. Valid values: 1 to 65535.

serverGroupId String

The ID of the server group.

serverId String

The ID of the backend server. You can specify the ID of an Elastic Compute Service (ECS) instance or an elastic network interface (ENI).

description String

The description of the backend server.

type String

The type of backend server. Valid values: ecs, eni.

weight Number

The weight of the backend server. Valid values: 0 to 100. Default value: 100. If the value is set to 0, no requests are forwarded to the backend server.

Outputs

All input properties are implicitly available as output properties. Additionally, the ServerGroupServerAttachment 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 ServerGroupServerAttachment Resource

Get an existing ServerGroupServerAttachment 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?: ServerGroupServerAttachmentState, opts?: CustomResourceOptions): ServerGroupServerAttachment
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        description: Optional[str] = None,
        port: Optional[int] = None,
        server_group_id: Optional[str] = None,
        server_id: Optional[str] = None,
        type: Optional[str] = None,
        weight: Optional[int] = None) -> ServerGroupServerAttachment
func GetServerGroupServerAttachment(ctx *Context, name string, id IDInput, state *ServerGroupServerAttachmentState, opts ...ResourceOption) (*ServerGroupServerAttachment, error)
public static ServerGroupServerAttachment Get(string name, Input<string> id, ServerGroupServerAttachmentState? state, CustomResourceOptions? opts = null)
public static ServerGroupServerAttachment get(String name, Output<String> id, ServerGroupServerAttachmentState 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:
Description string

The description of the backend server.

Port int

The port that is used by the backend server. Valid values: 1 to 65535.

ServerGroupId string

The ID of the server group.

ServerId string

The ID of the backend server. You can specify the ID of an Elastic Compute Service (ECS) instance or an elastic network interface (ENI).

Type string

The type of backend server. Valid values: ecs, eni.

Weight int

The weight of the backend server. Valid values: 0 to 100. Default value: 100. If the value is set to 0, no requests are forwarded to the backend server.

Description string

The description of the backend server.

Port int

The port that is used by the backend server. Valid values: 1 to 65535.

ServerGroupId string

The ID of the server group.

ServerId string

The ID of the backend server. You can specify the ID of an Elastic Compute Service (ECS) instance or an elastic network interface (ENI).

Type string

The type of backend server. Valid values: ecs, eni.

Weight int

The weight of the backend server. Valid values: 0 to 100. Default value: 100. If the value is set to 0, no requests are forwarded to the backend server.

description String

The description of the backend server.

port Integer

The port that is used by the backend server. Valid values: 1 to 65535.

serverGroupId String

The ID of the server group.

serverId String

The ID of the backend server. You can specify the ID of an Elastic Compute Service (ECS) instance or an elastic network interface (ENI).

type String

The type of backend server. Valid values: ecs, eni.

weight Integer

The weight of the backend server. Valid values: 0 to 100. Default value: 100. If the value is set to 0, no requests are forwarded to the backend server.

description string

The description of the backend server.

port number

The port that is used by the backend server. Valid values: 1 to 65535.

serverGroupId string

The ID of the server group.

serverId string

The ID of the backend server. You can specify the ID of an Elastic Compute Service (ECS) instance or an elastic network interface (ENI).

type string

The type of backend server. Valid values: ecs, eni.

weight number

The weight of the backend server. Valid values: 0 to 100. Default value: 100. If the value is set to 0, no requests are forwarded to the backend server.

description str

The description of the backend server.

port int

The port that is used by the backend server. Valid values: 1 to 65535.

server_group_id str

The ID of the server group.

server_id str

The ID of the backend server. You can specify the ID of an Elastic Compute Service (ECS) instance or an elastic network interface (ENI).

type str

The type of backend server. Valid values: ecs, eni.

weight int

The weight of the backend server. Valid values: 0 to 100. Default value: 100. If the value is set to 0, no requests are forwarded to the backend server.

description String

The description of the backend server.

port Number

The port that is used by the backend server. Valid values: 1 to 65535.

serverGroupId String

The ID of the server group.

serverId String

The ID of the backend server. You can specify the ID of an Elastic Compute Service (ECS) instance or an elastic network interface (ENI).

type String

The type of backend server. Valid values: ecs, eni.

weight Number

The weight of the backend server. Valid values: 0 to 100. Default value: 100. If the value is set to 0, no requests are forwarded to the backend server.

Import

Load balancer backend server group server attachment can be imported using the id, e.g.

 $ pulumi import alicloud:slb/serverGroupServerAttachment:ServerGroupServerAttachment example <server_group_id>:<server_id>:<port>

Package Details

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

This Pulumi package is based on the alicloud Terraform Provider.