alicloud.ess.AlbServerGroupAttachment
Explore with Pulumi AI
Attaches/Detaches alb server group to a specified scaling group.
For information about alb server group attachment, see AttachAlbServerGroups.
NOTE: If scaling group’s network type is
VPC
, the alb server groups must be in the sameVPC
.
NOTE: Alb server group attachment is defined uniquely by
scaling_group_id
,alb_server_group_id
,port
.
NOTE: Resource
alicloud.ess.AlbServerGroupAttachment
don’t support modification.
NOTE: Available since v1.158.0.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using AliCloud = Pulumi.AliCloud;
return await Deployment.RunAsync(() =>
{
var config = new Config();
var name = config.Get("name") ?? "terraform-example";
var defaultZones = AliCloud.GetZones.Invoke(new()
{
AvailableDiskCategory = "cloud_efficiency",
AvailableResourceCreation = "VSwitch",
});
var defaultInstanceTypes = AliCloud.Ecs.GetInstanceTypes.Invoke(new()
{
AvailabilityZone = defaultZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
CpuCoreCount = 2,
MemorySize = 4,
});
var defaultImages = AliCloud.Ecs.GetImages.Invoke(new()
{
NameRegex = "^ubuntu_18.*64",
MostRecent = true,
Owners = "system",
});
var defaultNetwork = new AliCloud.Vpc.Network("defaultNetwork", new()
{
VpcName = name,
CidrBlock = "172.16.0.0/16",
});
var defaultSwitch = new AliCloud.Vpc.Switch("defaultSwitch", new()
{
VpcId = defaultNetwork.Id,
CidrBlock = "172.16.0.0/24",
ZoneId = defaultZones.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
VswitchName = name,
});
var defaultSecurityGroup = new AliCloud.Ecs.SecurityGroup("defaultSecurityGroup", new()
{
VpcId = defaultNetwork.Id,
});
var defaultScalingGroup = new AliCloud.Ess.ScalingGroup("defaultScalingGroup", new()
{
MinSize = 0,
MaxSize = 2,
ScalingGroupName = name,
DefaultCooldown = 200,
RemovalPolicies = new[]
{
"OldestInstance",
},
VswitchIds = new[]
{
defaultSwitch.Id,
},
});
var defaultScalingConfiguration = new AliCloud.Ess.ScalingConfiguration("defaultScalingConfiguration", new()
{
ScalingGroupId = defaultScalingGroup.Id,
ImageId = defaultImages.Apply(getImagesResult => getImagesResult.Images[0]?.Id),
InstanceType = defaultInstanceTypes.Apply(getInstanceTypesResult => getInstanceTypesResult.InstanceTypes[0]?.Id),
SecurityGroupId = defaultSecurityGroup.Id,
ForceDelete = true,
Active = true,
Enable = true,
});
var defaultServerGroup = new AliCloud.Alb.ServerGroup("defaultServerGroup", new()
{
ServerGroupName = name,
VpcId = defaultNetwork.Id,
HealthCheckConfig = new AliCloud.Alb.Inputs.ServerGroupHealthCheckConfigArgs
{
HealthCheckEnabled = false,
},
StickySessionConfig = new AliCloud.Alb.Inputs.ServerGroupStickySessionConfigArgs
{
StickySessionEnabled = true,
Cookie = "tf-example",
StickySessionType = "Server",
},
});
var defaultAlbServerGroupAttachment = new AliCloud.Ess.AlbServerGroupAttachment("defaultAlbServerGroupAttachment", new()
{
ScalingGroupId = defaultScalingConfiguration.ScalingGroupId,
AlbServerGroupId = defaultServerGroup.Id,
Port = 9000,
Weight = 50,
ForceAttach = true,
});
});
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/alb"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ess"
"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, "")
name := "terraform-example"
if param := cfg.Get("name"); param != "" {
name = param
}
defaultZones, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
AvailableDiskCategory: pulumi.StringRef("cloud_efficiency"),
AvailableResourceCreation: pulumi.StringRef("VSwitch"),
}, nil)
if err != nil {
return err
}
defaultInstanceTypes, err := ecs.GetInstanceTypes(ctx, &ecs.GetInstanceTypesArgs{
AvailabilityZone: pulumi.StringRef(defaultZones.Zones[0].Id),
CpuCoreCount: pulumi.IntRef(2),
MemorySize: pulumi.Float64Ref(4),
}, nil)
if err != nil {
return err
}
defaultImages, err := ecs.GetImages(ctx, &ecs.GetImagesArgs{
NameRegex: pulumi.StringRef("^ubuntu_18.*64"),
MostRecent: pulumi.BoolRef(true),
Owners: pulumi.StringRef("system"),
}, nil)
if err != nil {
return err
}
defaultNetwork, err := vpc.NewNetwork(ctx, "defaultNetwork", &vpc.NetworkArgs{
VpcName: pulumi.String(name),
CidrBlock: pulumi.String("172.16.0.0/16"),
})
if err != nil {
return err
}
defaultSwitch, err := vpc.NewSwitch(ctx, "defaultSwitch", &vpc.SwitchArgs{
VpcId: defaultNetwork.ID(),
CidrBlock: pulumi.String("172.16.0.0/24"),
ZoneId: *pulumi.String(defaultZones.Zones[0].Id),
VswitchName: pulumi.String(name),
})
if err != nil {
return err
}
defaultSecurityGroup, err := ecs.NewSecurityGroup(ctx, "defaultSecurityGroup", &ecs.SecurityGroupArgs{
VpcId: defaultNetwork.ID(),
})
if err != nil {
return err
}
defaultScalingGroup, err := ess.NewScalingGroup(ctx, "defaultScalingGroup", &ess.ScalingGroupArgs{
MinSize: pulumi.Int(0),
MaxSize: pulumi.Int(2),
ScalingGroupName: pulumi.String(name),
DefaultCooldown: pulumi.Int(200),
RemovalPolicies: pulumi.StringArray{
pulumi.String("OldestInstance"),
},
VswitchIds: pulumi.StringArray{
defaultSwitch.ID(),
},
})
if err != nil {
return err
}
defaultScalingConfiguration, err := ess.NewScalingConfiguration(ctx, "defaultScalingConfiguration", &ess.ScalingConfigurationArgs{
ScalingGroupId: defaultScalingGroup.ID(),
ImageId: *pulumi.String(defaultImages.Images[0].Id),
InstanceType: *pulumi.String(defaultInstanceTypes.InstanceTypes[0].Id),
SecurityGroupId: defaultSecurityGroup.ID(),
ForceDelete: pulumi.Bool(true),
Active: pulumi.Bool(true),
Enable: pulumi.Bool(true),
})
if err != nil {
return err
}
defaultServerGroup, err := alb.NewServerGroup(ctx, "defaultServerGroup", &alb.ServerGroupArgs{
ServerGroupName: pulumi.String(name),
VpcId: defaultNetwork.ID(),
HealthCheckConfig: &alb.ServerGroupHealthCheckConfigArgs{
HealthCheckEnabled: pulumi.Bool(false),
},
StickySessionConfig: &alb.ServerGroupStickySessionConfigArgs{
StickySessionEnabled: pulumi.Bool(true),
Cookie: pulumi.String("tf-example"),
StickySessionType: pulumi.String("Server"),
},
})
if err != nil {
return err
}
_, err = ess.NewAlbServerGroupAttachment(ctx, "defaultAlbServerGroupAttachment", &ess.AlbServerGroupAttachmentArgs{
ScalingGroupId: defaultScalingConfiguration.ScalingGroupId,
AlbServerGroupId: defaultServerGroup.ID(),
Port: pulumi.Int(9000),
Weight: pulumi.Int(50),
ForceAttach: pulumi.Bool(true),
})
if err != nil {
return err
}
return nil
})
}
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.ecs.EcsFunctions;
import com.pulumi.alicloud.ecs.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.ess.ScalingGroup;
import com.pulumi.alicloud.ess.ScalingGroupArgs;
import com.pulumi.alicloud.ess.ScalingConfiguration;
import com.pulumi.alicloud.ess.ScalingConfigurationArgs;
import com.pulumi.alicloud.alb.ServerGroup;
import com.pulumi.alicloud.alb.ServerGroupArgs;
import com.pulumi.alicloud.alb.inputs.ServerGroupHealthCheckConfigArgs;
import com.pulumi.alicloud.alb.inputs.ServerGroupStickySessionConfigArgs;
import com.pulumi.alicloud.ess.AlbServerGroupAttachment;
import com.pulumi.alicloud.ess.AlbServerGroupAttachmentArgs;
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("terraform-example");
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(2)
.memorySize(4)
.build());
final var defaultImages = EcsFunctions.getImages(GetImagesArgs.builder()
.nameRegex("^ubuntu_18.*64")
.mostRecent(true)
.owners("system")
.build());
var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
.vpcName(name)
.cidrBlock("172.16.0.0/16")
.build());
var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
.vpcId(defaultNetwork.id())
.cidrBlock("172.16.0.0/24")
.zoneId(defaultZones.applyValue(getZonesResult -> getZonesResult.zones()[0].id()))
.vswitchName(name)
.build());
var defaultSecurityGroup = new SecurityGroup("defaultSecurityGroup", SecurityGroupArgs.builder()
.vpcId(defaultNetwork.id())
.build());
var defaultScalingGroup = new ScalingGroup("defaultScalingGroup", ScalingGroupArgs.builder()
.minSize("0")
.maxSize("2")
.scalingGroupName(name)
.defaultCooldown(200)
.removalPolicies("OldestInstance")
.vswitchIds(defaultSwitch.id())
.build());
var defaultScalingConfiguration = new ScalingConfiguration("defaultScalingConfiguration", ScalingConfigurationArgs.builder()
.scalingGroupId(defaultScalingGroup.id())
.imageId(defaultImages.applyValue(getImagesResult -> getImagesResult.images()[0].id()))
.instanceType(defaultInstanceTypes.applyValue(getInstanceTypesResult -> getInstanceTypesResult.instanceTypes()[0].id()))
.securityGroupId(defaultSecurityGroup.id())
.forceDelete(true)
.active(true)
.enable(true)
.build());
var defaultServerGroup = new ServerGroup("defaultServerGroup", ServerGroupArgs.builder()
.serverGroupName(name)
.vpcId(defaultNetwork.id())
.healthCheckConfig(ServerGroupHealthCheckConfigArgs.builder()
.healthCheckEnabled("false")
.build())
.stickySessionConfig(ServerGroupStickySessionConfigArgs.builder()
.stickySessionEnabled(true)
.cookie("tf-example")
.stickySessionType("Server")
.build())
.build());
var defaultAlbServerGroupAttachment = new AlbServerGroupAttachment("defaultAlbServerGroupAttachment", AlbServerGroupAttachmentArgs.builder()
.scalingGroupId(defaultScalingConfiguration.scalingGroupId())
.albServerGroupId(defaultServerGroup.id())
.port(9000)
.weight(50)
.forceAttach(true)
.build());
}
}
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "terraform-example"
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=2,
memory_size=4)
default_images = alicloud.ecs.get_images(name_regex="^ubuntu_18.*64",
most_recent=True,
owners="system")
default_network = alicloud.vpc.Network("defaultNetwork",
vpc_name=name,
cidr_block="172.16.0.0/16")
default_switch = alicloud.vpc.Switch("defaultSwitch",
vpc_id=default_network.id,
cidr_block="172.16.0.0/24",
zone_id=default_zones.zones[0].id,
vswitch_name=name)
default_security_group = alicloud.ecs.SecurityGroup("defaultSecurityGroup", vpc_id=default_network.id)
default_scaling_group = alicloud.ess.ScalingGroup("defaultScalingGroup",
min_size=0,
max_size=2,
scaling_group_name=name,
default_cooldown=200,
removal_policies=["OldestInstance"],
vswitch_ids=[default_switch.id])
default_scaling_configuration = alicloud.ess.ScalingConfiguration("defaultScalingConfiguration",
scaling_group_id=default_scaling_group.id,
image_id=default_images.images[0].id,
instance_type=default_instance_types.instance_types[0].id,
security_group_id=default_security_group.id,
force_delete=True,
active=True,
enable=True)
default_server_group = alicloud.alb.ServerGroup("defaultServerGroup",
server_group_name=name,
vpc_id=default_network.id,
health_check_config=alicloud.alb.ServerGroupHealthCheckConfigArgs(
health_check_enabled=False,
),
sticky_session_config=alicloud.alb.ServerGroupStickySessionConfigArgs(
sticky_session_enabled=True,
cookie="tf-example",
sticky_session_type="Server",
))
default_alb_server_group_attachment = alicloud.ess.AlbServerGroupAttachment("defaultAlbServerGroupAttachment",
scaling_group_id=default_scaling_configuration.scaling_group_id,
alb_server_group_id=default_server_group.id,
port=9000,
weight=50,
force_attach=True)
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "terraform-example";
const defaultZones = alicloud.getZones({
availableDiskCategory: "cloud_efficiency",
availableResourceCreation: "VSwitch",
});
const defaultInstanceTypes = defaultZones.then(defaultZones => alicloud.ecs.getInstanceTypes({
availabilityZone: defaultZones.zones?.[0]?.id,
cpuCoreCount: 2,
memorySize: 4,
}));
const defaultImages = alicloud.ecs.getImages({
nameRegex: "^ubuntu_18.*64",
mostRecent: true,
owners: "system",
});
const defaultNetwork = new alicloud.vpc.Network("defaultNetwork", {
vpcName: name,
cidrBlock: "172.16.0.0/16",
});
const defaultSwitch = new alicloud.vpc.Switch("defaultSwitch", {
vpcId: defaultNetwork.id,
cidrBlock: "172.16.0.0/24",
zoneId: defaultZones.then(defaultZones => defaultZones.zones?.[0]?.id),
vswitchName: name,
});
const defaultSecurityGroup = new alicloud.ecs.SecurityGroup("defaultSecurityGroup", {vpcId: defaultNetwork.id});
const defaultScalingGroup = new alicloud.ess.ScalingGroup("defaultScalingGroup", {
minSize: 0,
maxSize: 2,
scalingGroupName: name,
defaultCooldown: 200,
removalPolicies: ["OldestInstance"],
vswitchIds: [defaultSwitch.id],
});
const defaultScalingConfiguration = new alicloud.ess.ScalingConfiguration("defaultScalingConfiguration", {
scalingGroupId: defaultScalingGroup.id,
imageId: defaultImages.then(defaultImages => defaultImages.images?.[0]?.id),
instanceType: defaultInstanceTypes.then(defaultInstanceTypes => defaultInstanceTypes.instanceTypes?.[0]?.id),
securityGroupId: defaultSecurityGroup.id,
forceDelete: true,
active: true,
enable: true,
});
const defaultServerGroup = new alicloud.alb.ServerGroup("defaultServerGroup", {
serverGroupName: name,
vpcId: defaultNetwork.id,
healthCheckConfig: {
healthCheckEnabled: false,
},
stickySessionConfig: {
stickySessionEnabled: true,
cookie: "tf-example",
stickySessionType: "Server",
},
});
const defaultAlbServerGroupAttachment = new alicloud.ess.AlbServerGroupAttachment("defaultAlbServerGroupAttachment", {
scalingGroupId: defaultScalingConfiguration.scalingGroupId,
albServerGroupId: defaultServerGroup.id,
port: 9000,
weight: 50,
forceAttach: true,
});
configuration:
name:
type: string
default: terraform-example
resources:
defaultNetwork:
type: alicloud:vpc:Network
properties:
vpcName: ${name}
cidrBlock: 172.16.0.0/16
defaultSwitch:
type: alicloud:vpc:Switch
properties:
vpcId: ${defaultNetwork.id}
cidrBlock: 172.16.0.0/24
zoneId: ${defaultZones.zones[0].id}
vswitchName: ${name}
defaultSecurityGroup:
type: alicloud:ecs:SecurityGroup
properties:
vpcId: ${defaultNetwork.id}
defaultScalingGroup:
type: alicloud:ess:ScalingGroup
properties:
minSize: '0'
maxSize: '2'
scalingGroupName: ${name}
defaultCooldown: 200
removalPolicies:
- OldestInstance
vswitchIds:
- ${defaultSwitch.id}
defaultScalingConfiguration:
type: alicloud:ess:ScalingConfiguration
properties:
scalingGroupId: ${defaultScalingGroup.id}
imageId: ${defaultImages.images[0].id}
instanceType: ${defaultInstanceTypes.instanceTypes[0].id}
securityGroupId: ${defaultSecurityGroup.id}
forceDelete: true
active: true
enable: true
defaultServerGroup:
type: alicloud:alb:ServerGroup
properties:
serverGroupName: ${name}
vpcId: ${defaultNetwork.id}
healthCheckConfig:
healthCheckEnabled: 'false'
stickySessionConfig:
stickySessionEnabled: true
cookie: tf-example
stickySessionType: Server
defaultAlbServerGroupAttachment:
type: alicloud:ess:AlbServerGroupAttachment
properties:
scalingGroupId: ${defaultScalingConfiguration.scalingGroupId}
albServerGroupId: ${defaultServerGroup.id}
port: 9000
weight: 50
forceAttach: true
variables:
defaultZones:
fn::invoke:
Function: alicloud:getZones
Arguments:
availableDiskCategory: cloud_efficiency
availableResourceCreation: VSwitch
defaultInstanceTypes:
fn::invoke:
Function: alicloud:ecs:getInstanceTypes
Arguments:
availabilityZone: ${defaultZones.zones[0].id}
cpuCoreCount: 2
memorySize: 4
defaultImages:
fn::invoke:
Function: alicloud:ecs:getImages
Arguments:
nameRegex: ^ubuntu_18.*64
mostRecent: true
owners: system
Create AlbServerGroupAttachment Resource
new AlbServerGroupAttachment(name: string, args: AlbServerGroupAttachmentArgs, opts?: CustomResourceOptions);
@overload
def AlbServerGroupAttachment(resource_name: str,
opts: Optional[ResourceOptions] = None,
alb_server_group_id: Optional[str] = None,
force_attach: Optional[bool] = None,
port: Optional[int] = None,
scaling_group_id: Optional[str] = None,
weight: Optional[int] = None)
@overload
def AlbServerGroupAttachment(resource_name: str,
args: AlbServerGroupAttachmentArgs,
opts: Optional[ResourceOptions] = None)
func NewAlbServerGroupAttachment(ctx *Context, name string, args AlbServerGroupAttachmentArgs, opts ...ResourceOption) (*AlbServerGroupAttachment, error)
public AlbServerGroupAttachment(string name, AlbServerGroupAttachmentArgs args, CustomResourceOptions? opts = null)
public AlbServerGroupAttachment(String name, AlbServerGroupAttachmentArgs args)
public AlbServerGroupAttachment(String name, AlbServerGroupAttachmentArgs args, CustomResourceOptions options)
type: alicloud:ess:AlbServerGroupAttachment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AlbServerGroupAttachmentArgs
- 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 AlbServerGroupAttachmentArgs
- 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 AlbServerGroupAttachmentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AlbServerGroupAttachmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AlbServerGroupAttachmentArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
AlbServerGroupAttachment 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 AlbServerGroupAttachment resource accepts the following input properties:
- Alb
Server stringGroup Id ID of Alb Server Group.
- Port int
The port will be used for Alb Server Group backend server.
- Scaling
Group stringId ID of the scaling group.
- Weight int
The weight of an ECS instance attached to the Alb Server Group.
- Force
Attach bool If instances of scaling group are attached/removed from slb backend server when attach/detach alb server group from scaling group. Default to false.
- Alb
Server stringGroup Id ID of Alb Server Group.
- Port int
The port will be used for Alb Server Group backend server.
- Scaling
Group stringId ID of the scaling group.
- Weight int
The weight of an ECS instance attached to the Alb Server Group.
- Force
Attach bool If instances of scaling group are attached/removed from slb backend server when attach/detach alb server group from scaling group. Default to false.
- alb
Server StringGroup Id ID of Alb Server Group.
- port Integer
The port will be used for Alb Server Group backend server.
- scaling
Group StringId ID of the scaling group.
- weight Integer
The weight of an ECS instance attached to the Alb Server Group.
- force
Attach Boolean If instances of scaling group are attached/removed from slb backend server when attach/detach alb server group from scaling group. Default to false.
- alb
Server stringGroup Id ID of Alb Server Group.
- port number
The port will be used for Alb Server Group backend server.
- scaling
Group stringId ID of the scaling group.
- weight number
The weight of an ECS instance attached to the Alb Server Group.
- force
Attach boolean If instances of scaling group are attached/removed from slb backend server when attach/detach alb server group from scaling group. Default to false.
- alb_
server_ strgroup_ id ID of Alb Server Group.
- port int
The port will be used for Alb Server Group backend server.
- scaling_
group_ strid ID of the scaling group.
- weight int
The weight of an ECS instance attached to the Alb Server Group.
- force_
attach bool If instances of scaling group are attached/removed from slb backend server when attach/detach alb server group from scaling group. Default to false.
- alb
Server StringGroup Id ID of Alb Server Group.
- port Number
The port will be used for Alb Server Group backend server.
- scaling
Group StringId ID of the scaling group.
- weight Number
The weight of an ECS instance attached to the Alb Server Group.
- force
Attach Boolean If instances of scaling group are attached/removed from slb backend server when attach/detach alb server group from scaling group. Default to false.
Outputs
All input properties are implicitly available as output properties. Additionally, the AlbServerGroupAttachment 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 AlbServerGroupAttachment Resource
Get an existing AlbServerGroupAttachment 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?: AlbServerGroupAttachmentState, opts?: CustomResourceOptions): AlbServerGroupAttachment
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
alb_server_group_id: Optional[str] = None,
force_attach: Optional[bool] = None,
port: Optional[int] = None,
scaling_group_id: Optional[str] = None,
weight: Optional[int] = None) -> AlbServerGroupAttachment
func GetAlbServerGroupAttachment(ctx *Context, name string, id IDInput, state *AlbServerGroupAttachmentState, opts ...ResourceOption) (*AlbServerGroupAttachment, error)
public static AlbServerGroupAttachment Get(string name, Input<string> id, AlbServerGroupAttachmentState? state, CustomResourceOptions? opts = null)
public static AlbServerGroupAttachment get(String name, Output<String> id, AlbServerGroupAttachmentState 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.
- Alb
Server stringGroup Id ID of Alb Server Group.
- Force
Attach bool If instances of scaling group are attached/removed from slb backend server when attach/detach alb server group from scaling group. Default to false.
- Port int
The port will be used for Alb Server Group backend server.
- Scaling
Group stringId ID of the scaling group.
- Weight int
The weight of an ECS instance attached to the Alb Server Group.
- Alb
Server stringGroup Id ID of Alb Server Group.
- Force
Attach bool If instances of scaling group are attached/removed from slb backend server when attach/detach alb server group from scaling group. Default to false.
- Port int
The port will be used for Alb Server Group backend server.
- Scaling
Group stringId ID of the scaling group.
- Weight int
The weight of an ECS instance attached to the Alb Server Group.
- alb
Server StringGroup Id ID of Alb Server Group.
- force
Attach Boolean If instances of scaling group are attached/removed from slb backend server when attach/detach alb server group from scaling group. Default to false.
- port Integer
The port will be used for Alb Server Group backend server.
- scaling
Group StringId ID of the scaling group.
- weight Integer
The weight of an ECS instance attached to the Alb Server Group.
- alb
Server stringGroup Id ID of Alb Server Group.
- force
Attach boolean If instances of scaling group are attached/removed from slb backend server when attach/detach alb server group from scaling group. Default to false.
- port number
The port will be used for Alb Server Group backend server.
- scaling
Group stringId ID of the scaling group.
- weight number
The weight of an ECS instance attached to the Alb Server Group.
- alb_
server_ strgroup_ id ID of Alb Server Group.
- force_
attach bool If instances of scaling group are attached/removed from slb backend server when attach/detach alb server group from scaling group. Default to false.
- port int
The port will be used for Alb Server Group backend server.
- scaling_
group_ strid ID of the scaling group.
- weight int
The weight of an ECS instance attached to the Alb Server Group.
- alb
Server StringGroup Id ID of Alb Server Group.
- force
Attach Boolean If instances of scaling group are attached/removed from slb backend server when attach/detach alb server group from scaling group. Default to false.
- port Number
The port will be used for Alb Server Group backend server.
- scaling
Group StringId ID of the scaling group.
- weight Number
The weight of an ECS instance attached to the Alb Server Group.
Import
ESS alb server groups can be imported using the id, e.g.
$ pulumi import alicloud:ess/albServerGroupAttachment:AlbServerGroupAttachment example asg-xxx:sgp-xxx:5000
Package Details
- Repository
- Alibaba Cloud pulumi/pulumi-alicloud
- License
- Apache-2.0
- Notes
This Pulumi package is based on the
alicloud
Terraform Provider.