alicloud.slb.Attachment
Explore with Pulumi AI
DEPRECATED: This resource has been deprecated from v1.153.0 and using alicloud_backend_server instead.
Add a group of backend servers (ECS instance) to the Server Load Balancer or remove them from it.
NOTE: Deprecated since v1.153.0+.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as alicloud from "@pulumi/alicloud";
const config = new pulumi.Config();
const name = config.get("name") || "slb-attachment-example";
const default = alicloud.getZones({
availableDiskCategory: "cloud_efficiency",
availableResourceCreation: "VSwitch",
});
const defaultGetInstanceTypes = _default.then(_default => alicloud.ecs.getInstanceTypes({
availabilityZone: _default.zones?.[0]?.id,
cpuCoreCount: 1,
memorySize: 2,
}));
const defaultGetImages = alicloud.ecs.getImages({
nameRegex: "^ubuntu_18.*64",
mostRecent: true,
owners: "system",
});
const defaultNetwork = new alicloud.vpc.Network("default", {
name: name,
cidrBlock: "172.16.0.0/16",
});
const defaultSwitch = new alicloud.vpc.Switch("default", {
vpcId: defaultNetwork.id,
cidrBlock: "172.16.0.0/16",
zoneId: _default.then(_default => _default.zones?.[0]?.id),
vswitchName: name,
});
const defaultSecurityGroup = new alicloud.ecs.SecurityGroup("default", {
name: name,
vpcId: defaultNetwork.id,
});
const defaultInstance = new alicloud.ecs.Instance("default", {
imageId: defaultGetImages.then(defaultGetImages => defaultGetImages.images?.[0]?.id),
instanceType: defaultGetInstanceTypes.then(defaultGetInstanceTypes => defaultGetInstanceTypes.instanceTypes?.[0]?.id),
internetChargeType: "PayByTraffic",
internetMaxBandwidthOut: 5,
systemDiskCategory: "cloud_efficiency",
securityGroups: [defaultSecurityGroup.id],
instanceName: name,
vswitchId: defaultSwitch.id,
});
const defaultApplicationLoadBalancer = new alicloud.slb.ApplicationLoadBalancer("default", {
loadBalancerName: name,
vswitchId: defaultSwitch.id,
loadBalancerSpec: "slb.s1.small",
});
const defaultAttachment = new alicloud.slb.Attachment("default", {
loadBalancerId: defaultApplicationLoadBalancer.id,
instanceIds: [defaultInstance.id],
weight: 90,
});
import pulumi
import pulumi_alicloud as alicloud
config = pulumi.Config()
name = config.get("name")
if name is None:
name = "slb-attachment-example"
default = alicloud.get_zones(available_disk_category="cloud_efficiency",
available_resource_creation="VSwitch")
default_get_instance_types = alicloud.ecs.get_instance_types(availability_zone=default.zones[0].id,
cpu_core_count=1,
memory_size=2)
default_get_images = alicloud.ecs.get_images(name_regex="^ubuntu_18.*64",
most_recent=True,
owners="system")
default_network = alicloud.vpc.Network("default",
name=name,
cidr_block="172.16.0.0/16")
default_switch = alicloud.vpc.Switch("default",
vpc_id=default_network.id,
cidr_block="172.16.0.0/16",
zone_id=default.zones[0].id,
vswitch_name=name)
default_security_group = alicloud.ecs.SecurityGroup("default",
name=name,
vpc_id=default_network.id)
default_instance = alicloud.ecs.Instance("default",
image_id=default_get_images.images[0].id,
instance_type=default_get_instance_types.instance_types[0].id,
internet_charge_type="PayByTraffic",
internet_max_bandwidth_out=5,
system_disk_category="cloud_efficiency",
security_groups=[default_security_group.id],
instance_name=name,
vswitch_id=default_switch.id)
default_application_load_balancer = alicloud.slb.ApplicationLoadBalancer("default",
load_balancer_name=name,
vswitch_id=default_switch.id,
load_balancer_spec="slb.s1.small")
default_attachment = alicloud.slb.Attachment("default",
load_balancer_id=default_application_load_balancer.id,
instance_ids=[default_instance.id],
weight=90)
package main
import (
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud"
"github.com/pulumi/pulumi-alicloud/sdk/v3/go/alicloud/ecs"
"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, "")
name := "slb-attachment-example"
if param := cfg.Get("name"); param != "" {
name = param
}
_default, err := alicloud.GetZones(ctx, &alicloud.GetZonesArgs{
AvailableDiskCategory: pulumi.StringRef("cloud_efficiency"),
AvailableResourceCreation: pulumi.StringRef("VSwitch"),
}, nil)
if err != nil {
return err
}
defaultGetInstanceTypes, err := ecs.GetInstanceTypes(ctx, &ecs.GetInstanceTypesArgs{
AvailabilityZone: pulumi.StringRef(_default.Zones[0].Id),
CpuCoreCount: pulumi.IntRef(1),
MemorySize: pulumi.Float64Ref(2),
}, nil)
if err != nil {
return err
}
defaultGetImages, 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, "default", &vpc.NetworkArgs{
Name: pulumi.String(name),
CidrBlock: pulumi.String("172.16.0.0/16"),
})
if err != nil {
return err
}
defaultSwitch, err := vpc.NewSwitch(ctx, "default", &vpc.SwitchArgs{
VpcId: defaultNetwork.ID(),
CidrBlock: pulumi.String("172.16.0.0/16"),
ZoneId: pulumi.String(_default.Zones[0].Id),
VswitchName: pulumi.String(name),
})
if err != nil {
return err
}
defaultSecurityGroup, err := ecs.NewSecurityGroup(ctx, "default", &ecs.SecurityGroupArgs{
Name: pulumi.String(name),
VpcId: defaultNetwork.ID(),
})
if err != nil {
return err
}
defaultInstance, err := ecs.NewInstance(ctx, "default", &ecs.InstanceArgs{
ImageId: pulumi.String(defaultGetImages.Images[0].Id),
InstanceType: pulumi.String(defaultGetInstanceTypes.InstanceTypes[0].Id),
InternetChargeType: pulumi.String("PayByTraffic"),
InternetMaxBandwidthOut: pulumi.Int(5),
SystemDiskCategory: pulumi.String("cloud_efficiency"),
SecurityGroups: pulumi.StringArray{
defaultSecurityGroup.ID(),
},
InstanceName: pulumi.String(name),
VswitchId: defaultSwitch.ID(),
})
if err != nil {
return err
}
defaultApplicationLoadBalancer, err := slb.NewApplicationLoadBalancer(ctx, "default", &slb.ApplicationLoadBalancerArgs{
LoadBalancerName: pulumi.String(name),
VswitchId: defaultSwitch.ID(),
LoadBalancerSpec: pulumi.String("slb.s1.small"),
})
if err != nil {
return err
}
_, err = slb.NewAttachment(ctx, "default", &slb.AttachmentArgs{
LoadBalancerId: defaultApplicationLoadBalancer.ID(),
InstanceIds: pulumi.StringArray{
defaultInstance.ID(),
},
Weight: pulumi.Int(90),
})
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 name = config.Get("name") ?? "slb-attachment-example";
var @default = AliCloud.GetZones.Invoke(new()
{
AvailableDiskCategory = "cloud_efficiency",
AvailableResourceCreation = "VSwitch",
});
var defaultGetInstanceTypes = AliCloud.Ecs.GetInstanceTypes.Invoke(new()
{
AvailabilityZone = @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id),
CpuCoreCount = 1,
MemorySize = 2,
});
var defaultGetImages = AliCloud.Ecs.GetImages.Invoke(new()
{
NameRegex = "^ubuntu_18.*64",
MostRecent = true,
Owners = "system",
});
var defaultNetwork = new AliCloud.Vpc.Network("default", new()
{
Name = name,
CidrBlock = "172.16.0.0/16",
});
var defaultSwitch = new AliCloud.Vpc.Switch("default", new()
{
VpcId = defaultNetwork.Id,
CidrBlock = "172.16.0.0/16",
ZoneId = @default.Apply(@default => @default.Apply(getZonesResult => getZonesResult.Zones[0]?.Id)),
VswitchName = name,
});
var defaultSecurityGroup = new AliCloud.Ecs.SecurityGroup("default", new()
{
Name = name,
VpcId = defaultNetwork.Id,
});
var defaultInstance = new AliCloud.Ecs.Instance("default", new()
{
ImageId = defaultGetImages.Apply(getImagesResult => getImagesResult.Images[0]?.Id),
InstanceType = defaultGetInstanceTypes.Apply(getInstanceTypesResult => getInstanceTypesResult.InstanceTypes[0]?.Id),
InternetChargeType = "PayByTraffic",
InternetMaxBandwidthOut = 5,
SystemDiskCategory = "cloud_efficiency",
SecurityGroups = new[]
{
defaultSecurityGroup.Id,
},
InstanceName = name,
VswitchId = defaultSwitch.Id,
});
var defaultApplicationLoadBalancer = new AliCloud.Slb.ApplicationLoadBalancer("default", new()
{
LoadBalancerName = name,
VswitchId = defaultSwitch.Id,
LoadBalancerSpec = "slb.s1.small",
});
var defaultAttachment = new AliCloud.Slb.Attachment("default", new()
{
LoadBalancerId = defaultApplicationLoadBalancer.Id,
InstanceIds = new[]
{
defaultInstance.Id,
},
Weight = 90,
});
});
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.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.Attachment;
import com.pulumi.alicloud.slb.AttachmentArgs;
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("slb-attachment-example");
final var default = AlicloudFunctions.getZones(GetZonesArgs.builder()
.availableDiskCategory("cloud_efficiency")
.availableResourceCreation("VSwitch")
.build());
final var defaultGetInstanceTypes = EcsFunctions.getInstanceTypes(GetInstanceTypesArgs.builder()
.availabilityZone(default_.zones()[0].id())
.cpuCoreCount(1)
.memorySize(2)
.build());
final var defaultGetImages = EcsFunctions.getImages(GetImagesArgs.builder()
.nameRegex("^ubuntu_18.*64")
.mostRecent(true)
.owners("system")
.build());
var defaultNetwork = new Network("defaultNetwork", NetworkArgs.builder()
.name(name)
.cidrBlock("172.16.0.0/16")
.build());
var defaultSwitch = new Switch("defaultSwitch", SwitchArgs.builder()
.vpcId(defaultNetwork.id())
.cidrBlock("172.16.0.0/16")
.zoneId(default_.zones()[0].id())
.vswitchName(name)
.build());
var defaultSecurityGroup = new SecurityGroup("defaultSecurityGroup", SecurityGroupArgs.builder()
.name(name)
.vpcId(defaultNetwork.id())
.build());
var defaultInstance = new Instance("defaultInstance", InstanceArgs.builder()
.imageId(defaultGetImages.applyValue(getImagesResult -> getImagesResult.images()[0].id()))
.instanceType(defaultGetInstanceTypes.applyValue(getInstanceTypesResult -> getInstanceTypesResult.instanceTypes()[0].id()))
.internetChargeType("PayByTraffic")
.internetMaxBandwidthOut("5")
.systemDiskCategory("cloud_efficiency")
.securityGroups(defaultSecurityGroup.id())
.instanceName(name)
.vswitchId(defaultSwitch.id())
.build());
var defaultApplicationLoadBalancer = new ApplicationLoadBalancer("defaultApplicationLoadBalancer", ApplicationLoadBalancerArgs.builder()
.loadBalancerName(name)
.vswitchId(defaultSwitch.id())
.loadBalancerSpec("slb.s1.small")
.build());
var defaultAttachment = new Attachment("defaultAttachment", AttachmentArgs.builder()
.loadBalancerId(defaultApplicationLoadBalancer.id())
.instanceIds(defaultInstance.id())
.weight(90)
.build());
}
}
configuration:
name:
type: string
default: slb-attachment-example
resources:
defaultNetwork:
type: alicloud:vpc:Network
name: default
properties:
name: ${name}
cidrBlock: 172.16.0.0/16
defaultSwitch:
type: alicloud:vpc:Switch
name: default
properties:
vpcId: ${defaultNetwork.id}
cidrBlock: 172.16.0.0/16
zoneId: ${default.zones[0].id}
vswitchName: ${name}
defaultSecurityGroup:
type: alicloud:ecs:SecurityGroup
name: default
properties:
name: ${name}
vpcId: ${defaultNetwork.id}
defaultInstance:
type: alicloud:ecs:Instance
name: default
properties:
imageId: ${defaultGetImages.images[0].id}
instanceType: ${defaultGetInstanceTypes.instanceTypes[0].id}
internetChargeType: PayByTraffic
internetMaxBandwidthOut: '5'
systemDiskCategory: cloud_efficiency
securityGroups:
- ${defaultSecurityGroup.id}
instanceName: ${name}
vswitchId: ${defaultSwitch.id}
defaultApplicationLoadBalancer:
type: alicloud:slb:ApplicationLoadBalancer
name: default
properties:
loadBalancerName: ${name}
vswitchId: ${defaultSwitch.id}
loadBalancerSpec: slb.s1.small
defaultAttachment:
type: alicloud:slb:Attachment
name: default
properties:
loadBalancerId: ${defaultApplicationLoadBalancer.id}
instanceIds:
- ${defaultInstance.id}
weight: 90
variables:
default:
fn::invoke:
Function: alicloud:getZones
Arguments:
availableDiskCategory: cloud_efficiency
availableResourceCreation: VSwitch
defaultGetInstanceTypes:
fn::invoke:
Function: alicloud:ecs:getInstanceTypes
Arguments:
availabilityZone: ${default.zones[0].id}
cpuCoreCount: 1
memorySize: 2
defaultGetImages:
fn::invoke:
Function: alicloud:ecs:getImages
Arguments:
nameRegex: ^ubuntu_18.*64
mostRecent: true
owners: system
Create Attachment Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new Attachment(name: string, args: AttachmentArgs, opts?: CustomResourceOptions);
@overload
def Attachment(resource_name: str,
args: AttachmentArgs,
opts: Optional[ResourceOptions] = None)
@overload
def Attachment(resource_name: str,
opts: Optional[ResourceOptions] = None,
instance_ids: Optional[Sequence[str]] = None,
load_balancer_id: Optional[str] = None,
backend_servers: Optional[str] = None,
delete_protection_validation: Optional[bool] = None,
server_type: Optional[str] = None,
weight: Optional[int] = None)
func NewAttachment(ctx *Context, name string, args AttachmentArgs, opts ...ResourceOption) (*Attachment, error)
public Attachment(string name, AttachmentArgs args, CustomResourceOptions? opts = null)
public Attachment(String name, AttachmentArgs args)
public Attachment(String name, AttachmentArgs args, CustomResourceOptions options)
type: alicloud:slb:Attachment
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 AttachmentArgs
- 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 AttachmentArgs
- 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 AttachmentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args AttachmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args AttachmentArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var alicloudAttachmentResource = new AliCloud.Slb.Attachment("alicloudAttachmentResource", new()
{
InstanceIds = new[]
{
"string",
},
LoadBalancerId = "string",
BackendServers = "string",
DeleteProtectionValidation = false,
ServerType = "string",
Weight = 0,
});
example, err := slb.NewAttachment(ctx, "alicloudAttachmentResource", &slb.AttachmentArgs{
InstanceIds: pulumi.StringArray{
pulumi.String("string"),
},
LoadBalancerId: pulumi.String("string"),
BackendServers: pulumi.String("string"),
DeleteProtectionValidation: pulumi.Bool(false),
ServerType: pulumi.String("string"),
Weight: pulumi.Int(0),
})
var alicloudAttachmentResource = new Attachment("alicloudAttachmentResource", AttachmentArgs.builder()
.instanceIds("string")
.loadBalancerId("string")
.backendServers("string")
.deleteProtectionValidation(false)
.serverType("string")
.weight(0)
.build());
alicloud_attachment_resource = alicloud.slb.Attachment("alicloudAttachmentResource",
instance_ids=["string"],
load_balancer_id="string",
backend_servers="string",
delete_protection_validation=False,
server_type="string",
weight=0)
const alicloudAttachmentResource = new alicloud.slb.Attachment("alicloudAttachmentResource", {
instanceIds: ["string"],
loadBalancerId: "string",
backendServers: "string",
deleteProtectionValidation: false,
serverType: "string",
weight: 0,
});
type: alicloud:slb:Attachment
properties:
backendServers: string
deleteProtectionValidation: false
instanceIds:
- string
loadBalancerId: string
serverType: string
weight: 0
Attachment Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The Attachment resource accepts the following input properties:
- Instance
Ids List<string> - A list of instance ids to added backend server in the SLB.
- Load
Balancer stringId - ID of the load balancer.
- Backend
Servers string - The backend servers of the load balancer.
- Delete
Protection boolValidation - Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
- Server
Type string - Type of the instances. Valid value ecs, eni. Default to ecs.
- Weight int
- Weight of the instances. Valid value range: [0-100]. Default to 100.
- Instance
Ids []string - A list of instance ids to added backend server in the SLB.
- Load
Balancer stringId - ID of the load balancer.
- Backend
Servers string - The backend servers of the load balancer.
- Delete
Protection boolValidation - Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
- Server
Type string - Type of the instances. Valid value ecs, eni. Default to ecs.
- Weight int
- Weight of the instances. Valid value range: [0-100]. Default to 100.
- instance
Ids List<String> - A list of instance ids to added backend server in the SLB.
- load
Balancer StringId - ID of the load balancer.
- backend
Servers String - The backend servers of the load balancer.
- delete
Protection BooleanValidation - Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
- server
Type String - Type of the instances. Valid value ecs, eni. Default to ecs.
- weight Integer
- Weight of the instances. Valid value range: [0-100]. Default to 100.
- instance
Ids string[] - A list of instance ids to added backend server in the SLB.
- load
Balancer stringId - ID of the load balancer.
- backend
Servers string - The backend servers of the load balancer.
- delete
Protection booleanValidation - Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
- server
Type string - Type of the instances. Valid value ecs, eni. Default to ecs.
- weight number
- Weight of the instances. Valid value range: [0-100]. Default to 100.
- instance_
ids Sequence[str] - A list of instance ids to added backend server in the SLB.
- load_
balancer_ strid - ID of the load balancer.
- backend_
servers str - The backend servers of the load balancer.
- delete_
protection_ boolvalidation - Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
- server_
type str - Type of the instances. Valid value ecs, eni. Default to ecs.
- weight int
- Weight of the instances. Valid value range: [0-100]. Default to 100.
- instance
Ids List<String> - A list of instance ids to added backend server in the SLB.
- load
Balancer StringId - ID of the load balancer.
- backend
Servers String - The backend servers of the load balancer.
- delete
Protection BooleanValidation - Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
- server
Type String - Type of the instances. Valid value ecs, eni. Default to ecs.
- weight Number
- Weight of the instances. Valid value range: [0-100]. Default to 100.
Outputs
All input properties are implicitly available as output properties. Additionally, the Attachment 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 Attachment Resource
Get an existing Attachment 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?: AttachmentState, opts?: CustomResourceOptions): Attachment
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
backend_servers: Optional[str] = None,
delete_protection_validation: Optional[bool] = None,
instance_ids: Optional[Sequence[str]] = None,
load_balancer_id: Optional[str] = None,
server_type: Optional[str] = None,
weight: Optional[int] = None) -> Attachment
func GetAttachment(ctx *Context, name string, id IDInput, state *AttachmentState, opts ...ResourceOption) (*Attachment, error)
public static Attachment Get(string name, Input<string> id, AttachmentState? state, CustomResourceOptions? opts = null)
public static Attachment get(String name, Output<String> id, AttachmentState 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.
- Backend
Servers string - The backend servers of the load balancer.
- Delete
Protection boolValidation - Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
- Instance
Ids List<string> - A list of instance ids to added backend server in the SLB.
- Load
Balancer stringId - ID of the load balancer.
- Server
Type string - Type of the instances. Valid value ecs, eni. Default to ecs.
- Weight int
- Weight of the instances. Valid value range: [0-100]. Default to 100.
- Backend
Servers string - The backend servers of the load balancer.
- Delete
Protection boolValidation - Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
- Instance
Ids []string - A list of instance ids to added backend server in the SLB.
- Load
Balancer stringId - ID of the load balancer.
- Server
Type string - Type of the instances. Valid value ecs, eni. Default to ecs.
- Weight int
- Weight of the instances. Valid value range: [0-100]. Default to 100.
- backend
Servers String - The backend servers of the load balancer.
- delete
Protection BooleanValidation - Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
- instance
Ids List<String> - A list of instance ids to added backend server in the SLB.
- load
Balancer StringId - ID of the load balancer.
- server
Type String - Type of the instances. Valid value ecs, eni. Default to ecs.
- weight Integer
- Weight of the instances. Valid value range: [0-100]. Default to 100.
- backend
Servers string - The backend servers of the load balancer.
- delete
Protection booleanValidation - Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
- instance
Ids string[] - A list of instance ids to added backend server in the SLB.
- load
Balancer stringId - ID of the load balancer.
- server
Type string - Type of the instances. Valid value ecs, eni. Default to ecs.
- weight number
- Weight of the instances. Valid value range: [0-100]. Default to 100.
- backend_
servers str - The backend servers of the load balancer.
- delete_
protection_ boolvalidation - Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
- instance_
ids Sequence[str] - A list of instance ids to added backend server in the SLB.
- load_
balancer_ strid - ID of the load balancer.
- server_
type str - Type of the instances. Valid value ecs, eni. Default to ecs.
- weight int
- Weight of the instances. Valid value range: [0-100]. Default to 100.
- backend
Servers String - The backend servers of the load balancer.
- delete
Protection BooleanValidation - Checking DeleteProtection of SLB instance before deleting. If true, this resource will not be deleted when its SLB instance enabled DeleteProtection. Default to false.
- instance
Ids List<String> - A list of instance ids to added backend server in the SLB.
- load
Balancer StringId - ID of the load balancer.
- server
Type String - Type of the instances. Valid value ecs, eni. Default to ecs.
- weight Number
- Weight of the instances. Valid value range: [0-100]. Default to 100.
Import
Load balancer attachment can be imported using the id or load balancer id, e.g.
$ pulumi import alicloud:slb/attachment:Attachment example lb-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.