1. Packages
  2. Alibaba Cloud
  3. API Docs
  4. slb
  5. ServerGroup
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

alicloud.slb.ServerGroup

Explore with Pulumi AI

alicloud logo
Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi

    A virtual server group contains several ECS instances. The virtual server group can help you to define multiple listening dimension, and to meet the personalized requirements of domain name and URL forwarding.

    NOTE: Available since v1.6.0.

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

    NOTE: One virtual server group can be attached with multiple listeners in one load balancer.

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

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

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

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

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as alicloud from "@pulumi/alicloud";
    
    const config = new pulumi.Config();
    const slbServerGroupName = config.get("slbServerGroupName") || "forSlbServerGroup";
    const serverGroupZones = alicloud.getZones({
        availableResourceCreation: "VSwitch",
    });
    const serverGroupNetwork = new alicloud.vpc.Network("serverGroupNetwork", {
        vpcName: slbServerGroupName,
        cidrBlock: "172.16.0.0/16",
    });
    const serverGroupSwitch = new alicloud.vpc.Switch("serverGroupSwitch", {
        vpcId: serverGroupNetwork.id,
        cidrBlock: "172.16.0.0/16",
        zoneId: serverGroupZones.then(serverGroupZones => serverGroupZones.zones?.[0]?.id),
        vswitchName: slbServerGroupName,
    });
    const serverGroupApplicationLoadBalancer = new alicloud.slb.ApplicationLoadBalancer("serverGroupApplicationLoadBalancer", {
        loadBalancerName: slbServerGroupName,
        vswitchId: serverGroupSwitch.id,
        instanceChargeType: "PayByCLCU",
    });
    const serverGroupServerGroup = new alicloud.slb.ServerGroup("serverGroupServerGroup", {loadBalancerId: serverGroupApplicationLoadBalancer.id});
    
    import pulumi
    import pulumi_alicloud as alicloud
    
    config = pulumi.Config()
    slb_server_group_name = config.get("slbServerGroupName")
    if slb_server_group_name is None:
        slb_server_group_name = "forSlbServerGroup"
    server_group_zones = alicloud.get_zones(available_resource_creation="VSwitch")
    server_group_network = alicloud.vpc.Network("serverGroupNetwork",
        vpc_name=slb_server_group_name,
        cidr_block="172.16.0.0/16")
    server_group_switch = alicloud.vpc.Switch("serverGroupSwitch",
        vpc_id=server_group_network.id,
        cidr_block="172.16.0.0/16",
        zone_id=server_group_zones.zones[0].id,
        vswitch_name=slb_server_group_name)
    server_group_application_load_balancer = alicloud.slb.ApplicationLoadBalancer("serverGroupApplicationLoadBalancer",
        load_balancer_name=slb_server_group_name,
        vswitch_id=server_group_switch.id,
        instance_charge_type="PayByCLCU")
    server_group_server_group = alicloud.slb.ServerGroup("serverGroupServerGroup", load_balancer_id=server_group_application_load_balancer.id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/slb"
    	"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/vpc"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi/config"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		cfg := config.New(ctx, "")
    		slbServerGroupName := "forSlbServerGroup"
    		if param := cfg.Get("slbServerGroupName"); param != "" {
    			slbServerGroupName = param
    		}
    		serverGroupZones, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
    			AvailableResourceCreation: pulumi.StringRef("VSwitch"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		serverGroupNetwork, err := vpc.NewNetwork(ctx, "serverGroupNetwork", &vpc.NetworkArgs{
    			VpcName:   pulumi.String(slbServerGroupName),
    			CidrBlock: pulumi.String("172.16.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		serverGroupSwitch, err := vpc.NewSwitch(ctx, "serverGroupSwitch", &vpc.SwitchArgs{
    			VpcId:       serverGroupNetwork.ID(),
    			CidrBlock:   pulumi.String("172.16.0.0/16"),
    			ZoneId:      pulumi.String(serverGroupZones.Zones[0].Id),
    			VswitchName: pulumi.String(slbServerGroupName),
    		})
    		if err != nil {
    			return err
    		}
    		serverGroupApplicationLoadBalancer, err := slb.NewApplicationLoadBalancer(ctx, "serverGroupApplicationLoadBalancer", &slb.ApplicationLoadBalancerArgs{
    			LoadBalancerName:   pulumi.String(slbServerGroupName),
    			VswitchId:          serverGroupSwitch.ID(),
    			InstanceChargeType: pulumi.String("PayByCLCU"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = slb.NewServerGroup(ctx, "serverGroupServerGroup", &slb.ServerGroupArgs{
    			LoadBalancerId: serverGroupApplicationLoadBalancer.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using AliCloud = Pulumi.AliCloud;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var slbServerGroupName = config.Get("slbServerGroupName") ?? "forSlbServerGroup";
        var serverGroupZones = AliCloud.GetZones.Invoke(new()
        {
            AvailableResourceCreation = "VSwitch",
        });
    
        var serverGroupNetwork = new AliCloud.Vpc.Network("serverGroupNetwork", new()
        {
            VpcName = slbServerGroupName,
            CidrBlock = "172.16.0.0/16",
        });
    
        var serverGroupSwitch = new AliCloud.Vpc.Switch("serverGroupSwitch", new()
        {
            VpcId = serverGroupNetwork.Id,
            CidrBlock = "172.16.0.0/16",
            ZoneId = serverGroupZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
            VswitchName = slbServerGroupName,
        });
    
        var serverGroupApplicationLoadBalancer = new AliCloud.Slb.ApplicationLoadBalancer("serverGroupApplicationLoadBalancer", new()
        {
            LoadBalancerName = slbServerGroupName,
            VswitchId = serverGroupSwitch.Id,
            InstanceChargeType = "PayByCLCU",
        });
    
        var serverGroupServerGroup = new AliCloud.Slb.ServerGroup("serverGroupServerGroup", new()
        {
            LoadBalancerId = serverGroupApplicationLoadBalancer.Id,
        });
    
    });
    
    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.inputs.GetZonesArgs;
    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.slb.ApplicationLoadBalancer;
    import com.pulumi.alicloud.slb.ApplicationLoadBalancerArgs;
    import com.pulumi.alicloud.slb.ServerGroup;
    import com.pulumi.alicloud.slb.ServerGroupArgs;
    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 slbServerGroupName = config.get("slbServerGroupName").orElse("forSlbServerGroup");
            final var serverGroupZones = AlicloudFunctions.getZones(GetZonesArgs.builder()
                .availableResourceCreation("VSwitch")
                .build());
    
            var serverGroupNetwork = new Network("serverGroupNetwork", NetworkArgs.builder()        
                .vpcName(slbServerGroupName)
                .cidrBlock("172.16.0.0/16")
                .build());
    
            var serverGroupSwitch = new Switch("serverGroupSwitch", SwitchArgs.builder()        
                .vpcId(serverGroupNetwork.id())
                .cidrBlock("172.16.0.0/16")
                .zoneId(serverGroupZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
                .vswitchName(slbServerGroupName)
                .build());
    
            var serverGroupApplicationLoadBalancer = new ApplicationLoadBalancer("serverGroupApplicationLoadBalancer", ApplicationLoadBalancerArgs.builder()        
                .loadBalancerName(slbServerGroupName)
                .vswitchId(serverGroupSwitch.id())
                .instanceChargeType("PayByCLCU")
                .build());
    
            var serverGroupServerGroup = new ServerGroup("serverGroupServerGroup", ServerGroupArgs.builder()        
                .loadBalancerId(serverGroupApplicationLoadBalancer.id())
                .build());
    
        }
    }
    
    configuration:
      slbServerGroupName:
        type: string
        default: forSlbServerGroup
    resources:
      serverGroupNetwork:
        type: alicloud:vpc:Network
        properties:
          vpcName: ${slbServerGroupName}
          cidrBlock: 172.16.0.0/16
      serverGroupSwitch:
        type: alicloud:vpc:Switch
        properties:
          vpcId: ${serverGroupNetwork.id}
          cidrBlock: 172.16.0.0/16
          zoneId: ${serverGroupZones.zones[0].id}
          vswitchName: ${slbServerGroupName}
      serverGroupApplicationLoadBalancer:
        type: alicloud:slb:ApplicationLoadBalancer
        properties:
          loadBalancerName: ${slbServerGroupName}
          vswitchId: ${serverGroupSwitch.id}
          instanceChargeType: PayByCLCU
      serverGroupServerGroup:
        type: alicloud:slb:ServerGroup
        properties:
          loadBalancerId: ${serverGroupApplicationLoadBalancer.id}
    variables:
      serverGroupZones:
        fn::invoke:
          Function: alicloud:getZones
          Arguments:
            availableResourceCreation: VSwitch
    

    Create ServerGroup Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

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

    Parameters

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

    Example

    The following reference example uses placeholder values for all input properties.

    var exampleserverGroupResourceResourceFromSlbserverGroup = new AliCloud.Slb.ServerGroup("exampleserverGroupResourceResourceFromSlbserverGroup", new()
    {
        LoadBalancerId = "string",
        DeleteProtectionValidation = false,
        Name = "string",
    });
    
    example, err := slb.NewServerGroup(ctx, "exampleserverGroupResourceResourceFromSlbserverGroup", &slb.ServerGroupArgs{
    	LoadBalancerId:             pulumi.String("string"),
    	DeleteProtectionValidation: pulumi.Bool(false),
    	Name:                       pulumi.String("string"),
    })
    
    var exampleserverGroupResourceResourceFromSlbserverGroup = new ServerGroup("exampleserverGroupResourceResourceFromSlbserverGroup", ServerGroupArgs.builder()        
        .loadBalancerId("string")
        .deleteProtectionValidation(false)
        .name("string")
        .build());
    
    exampleserver_group_resource_resource_from_slbserver_group = alicloud.slb.ServerGroup("exampleserverGroupResourceResourceFromSlbserverGroup",
        load_balancer_id="string",
        delete_protection_validation=False,
        name="string")
    
    const exampleserverGroupResourceResourceFromSlbserverGroup = new alicloud.slb.ServerGroup("exampleserverGroupResourceResourceFromSlbserverGroup", {
        loadBalancerId: "string",
        deleteProtectionValidation: false,
        name: "string",
    });
    
    type: alicloud:slb:ServerGroup
    properties:
        deleteProtectionValidation: false
        loadBalancerId: string
        name: string
    

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

    LoadBalancerId string
    The Load Balancer ID which is used to launch a new virtual 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 virtual server group. Our plugin provides a default name: "tf-server-group".
    Servers List<Pulumi.AliCloud.Slb.Inputs.ServerGroupServer>
    A list of ECS instances to be added. NOTE: Field 'servers' has been deprecated from provider version 1.163.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_server_group_server_attachment'. At most 20 ECS instances can be supported in one resource. It contains three sub-fields as Block server follows. See servers below for details.

    Deprecated: Field 'servers' has been deprecated from provider version 1.163.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_server_group_server_attachment'.

    LoadBalancerId string
    The Load Balancer ID which is used to launch a new virtual 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 virtual server group. Our plugin provides a default name: "tf-server-group".
    Servers []ServerGroupServerArgs
    A list of ECS instances to be added. NOTE: Field 'servers' has been deprecated from provider version 1.163.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_server_group_server_attachment'. At most 20 ECS instances can be supported in one resource. It contains three sub-fields as Block server follows. See servers below for details.

    Deprecated: Field 'servers' has been deprecated from provider version 1.163.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_server_group_server_attachment'.

    loadBalancerId String
    The Load Balancer ID which is used to launch a new virtual 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 virtual server group. Our plugin provides a default name: "tf-server-group".
    servers List<ServerGroupServer>
    A list of ECS instances to be added. NOTE: Field 'servers' has been deprecated from provider version 1.163.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_server_group_server_attachment'. At most 20 ECS instances can be supported in one resource. It contains three sub-fields as Block server follows. See servers below for details.

    Deprecated: Field 'servers' has been deprecated from provider version 1.163.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_server_group_server_attachment'.

    loadBalancerId string
    The Load Balancer ID which is used to launch a new virtual 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 virtual server group. Our plugin provides a default name: "tf-server-group".
    servers ServerGroupServer[]
    A list of ECS instances to be added. NOTE: Field 'servers' has been deprecated from provider version 1.163.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_server_group_server_attachment'. At most 20 ECS instances can be supported in one resource. It contains three sub-fields as Block server follows. See servers below for details.

    Deprecated: Field 'servers' has been deprecated from provider version 1.163.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_server_group_server_attachment'.

    load_balancer_id str
    The Load Balancer ID which is used to launch a new virtual 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 virtual server group. Our plugin provides a default name: "tf-server-group".
    servers Sequence[ServerGroupServerArgs]
    A list of ECS instances to be added. NOTE: Field 'servers' has been deprecated from provider version 1.163.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_server_group_server_attachment'. At most 20 ECS instances can be supported in one resource. It contains three sub-fields as Block server follows. See servers below for details.

    Deprecated: Field 'servers' has been deprecated from provider version 1.163.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_server_group_server_attachment'.

    loadBalancerId String
    The Load Balancer ID which is used to launch a new virtual 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 virtual server group. Our plugin provides a default name: "tf-server-group".
    servers List<Property Map>
    A list of ECS instances to be added. NOTE: Field 'servers' has been deprecated from provider version 1.163.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_server_group_server_attachment'. At most 20 ECS instances can be supported in one resource. It contains three sub-fields as Block server follows. See servers below for details.

    Deprecated: Field 'servers' has been deprecated from provider version 1.163.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_server_group_server_attachment'.

    Outputs

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

    Get an existing ServerGroup 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?: ServerGroupState, opts?: CustomResourceOptions): ServerGroup
    @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[ServerGroupServerArgs]] = None) -> ServerGroup
    func GetServerGroup(ctx *Context, name string, id IDInput, state *ServerGroupState, opts ...ResourceOption) (*ServerGroup, error)
    public static ServerGroup Get(string name, Input<string> id, ServerGroupState? state, CustomResourceOptions? opts = null)
    public static ServerGroup get(String name, Output<String> id, ServerGroupState 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 virtual server group.
    Name string
    Name of the virtual server group. Our plugin provides a default name: "tf-server-group".
    Servers List<Pulumi.AliCloud.Slb.Inputs.ServerGroupServer>
    A list of ECS instances to be added. NOTE: Field 'servers' has been deprecated from provider version 1.163.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_server_group_server_attachment'. At most 20 ECS instances can be supported in one resource. It contains three sub-fields as Block server follows. See servers below for details.

    Deprecated: Field 'servers' has been deprecated from provider version 1.163.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_server_group_server_attachment'.

    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 virtual server group.
    Name string
    Name of the virtual server group. Our plugin provides a default name: "tf-server-group".
    Servers []ServerGroupServerArgs
    A list of ECS instances to be added. NOTE: Field 'servers' has been deprecated from provider version 1.163.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_server_group_server_attachment'. At most 20 ECS instances can be supported in one resource. It contains three sub-fields as Block server follows. See servers below for details.

    Deprecated: Field 'servers' has been deprecated from provider version 1.163.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_server_group_server_attachment'.

    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 virtual server group.
    name String
    Name of the virtual server group. Our plugin provides a default name: "tf-server-group".
    servers List<ServerGroupServer>
    A list of ECS instances to be added. NOTE: Field 'servers' has been deprecated from provider version 1.163.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_server_group_server_attachment'. At most 20 ECS instances can be supported in one resource. It contains three sub-fields as Block server follows. See servers below for details.

    Deprecated: Field 'servers' has been deprecated from provider version 1.163.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_server_group_server_attachment'.

    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 virtual server group.
    name string
    Name of the virtual server group. Our plugin provides a default name: "tf-server-group".
    servers ServerGroupServer[]
    A list of ECS instances to be added. NOTE: Field 'servers' has been deprecated from provider version 1.163.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_server_group_server_attachment'. At most 20 ECS instances can be supported in one resource. It contains three sub-fields as Block server follows. See servers below for details.

    Deprecated: Field 'servers' has been deprecated from provider version 1.163.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_server_group_server_attachment'.

    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 virtual server group.
    name str
    Name of the virtual server group. Our plugin provides a default name: "tf-server-group".
    servers Sequence[ServerGroupServerArgs]
    A list of ECS instances to be added. NOTE: Field 'servers' has been deprecated from provider version 1.163.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_server_group_server_attachment'. At most 20 ECS instances can be supported in one resource. It contains three sub-fields as Block server follows. See servers below for details.

    Deprecated: Field 'servers' has been deprecated from provider version 1.163.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_server_group_server_attachment'.

    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 virtual server group.
    name String
    Name of the virtual server group. Our plugin provides a default name: "tf-server-group".
    servers List<Property Map>
    A list of ECS instances to be added. NOTE: Field 'servers' has been deprecated from provider version 1.163.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_server_group_server_attachment'. At most 20 ECS instances can be supported in one resource. It contains three sub-fields as Block server follows. See servers below for details.

    Deprecated: Field 'servers' has been deprecated from provider version 1.163.0 and it will be removed in the future version. Please use the new resource 'alicloud_slb_server_group_server_attachment'.

    Supporting Types

    ServerGroupServer, ServerGroupServerArgs

    Port int
    The port used by the backend server. Valid value range: [1-65535].
    ServerIds List<string>
    A list backend server ID (ECS instance ID).
    Type string
    Type of the backend server. Valid value ecs, eni. Default to eni.
    Weight int
    Weight of the backend server. Valid value range: [0-100]. Default to 100.
    Port int
    The port used by the backend server. Valid value range: [1-65535].
    ServerIds []string
    A list backend server ID (ECS instance ID).
    Type string
    Type of the backend server. Valid value ecs, eni. Default to eni.
    Weight int
    Weight of the backend server. Valid value range: [0-100]. Default to 100.
    port Integer
    The port used by the backend server. Valid value range: [1-65535].
    serverIds List<String>
    A list backend server ID (ECS instance ID).
    type String
    Type of the backend server. Valid value ecs, eni. Default to eni.
    weight Integer
    Weight of the backend server. Valid value range: [0-100]. Default to 100.
    port number
    The port used by the backend server. Valid value range: [1-65535].
    serverIds string[]
    A list backend server ID (ECS instance ID).
    type string
    Type of the backend server. Valid value ecs, eni. Default to eni.
    weight number
    Weight of the backend server. Valid value range: [0-100]. Default to 100.
    port int
    The port used by the backend server. Valid value range: [1-65535].
    server_ids Sequence[str]
    A list backend server ID (ECS instance ID).
    type str
    Type of the backend server. Valid value ecs, eni. Default to eni.
    weight int
    Weight of the backend server. Valid value range: [0-100]. Default to 100.
    port Number
    The port used by the backend server. Valid value range: [1-65535].
    serverIds List<String>
    A list backend server ID (ECS instance ID).
    type String
    Type of the backend server. Valid value ecs, eni. Default to eni.
    weight Number
    Weight of the backend server. Valid value range: [0-100]. Default to 100.

    Import

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

    $ pulumi import alicloud:slb/serverGroup:ServerGroup example abc123456
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    Alibaba Cloud pulumi/pulumi-alicloud
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the alicloud Terraform Provider.
    alicloud logo
    Alibaba Cloud v3.53.0 published on Wednesday, Apr 17, 2024 by Pulumi