ServerGroup

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: 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.

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.

Create ServerGroup Resource

new ServerGroup(name: string, args: ServerGroupArgs, opts?: CustomResourceOptions);
@overload
def ServerGroup(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[ServerGroupServerArgs]] = None)
@overload
def ServerGroup(resource_name: str,
                args: ServerGroupArgs,
                opts: Optional[ResourceOptions] = 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.

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.

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.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.

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.

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<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.

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 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.

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.

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.

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.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.

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.

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<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.

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 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.

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.

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.

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

Port int
ServerIds List<string>
Type string
Weight int
Port int
ServerIds []string
Type string
Weight int
port Integer
serverIds List<String>
type String
weight Integer
port number
serverIds string[]
type string
weight number
port int
server_ids Sequence[str]
type str
weight int
port Number
serverIds List<String>
type String
weight Number

Import

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

 $ pulumi import alicloud:slb/serverGroup:ServerGroup 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.