1. Packages
  2. Volcengine
  3. API Docs
  4. autoscaling
  5. ScalingInstanceAttachment
Volcengine v0.0.26 published on Friday, Sep 13, 2024 by Volcengine

volcengine.autoscaling.ScalingInstanceAttachment

Explore with Pulumi AI

volcengine logo
Volcengine v0.0.26 published on Friday, Sep 13, 2024 by Volcengine

    Provides a resource to manage scaling instance attachment

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Volcengine = Pulumi.Volcengine;
    
    return await Deployment.RunAsync(() => 
    {
        var fooZones = Volcengine.Ecs.Zones.Invoke();
    
        var fooVpc = new Volcengine.Vpc.Vpc("fooVpc", new()
        {
            VpcName = "acc-test-vpc",
            CidrBlock = "172.16.0.0/16",
        });
    
        var fooSubnet = new Volcengine.Vpc.Subnet("fooSubnet", new()
        {
            SubnetName = "acc-test-subnet",
            CidrBlock = "172.16.0.0/24",
            ZoneId = fooZones.Apply(zonesResult => zonesResult.Zones[0]?.Id),
            VpcId = fooVpc.Id,
        });
    
        var fooSecurityGroup = new Volcengine.Vpc.SecurityGroup("fooSecurityGroup", new()
        {
            SecurityGroupName = "acc-test-security-group",
            VpcId = fooVpc.Id,
        });
    
        var fooImages = Volcengine.Ecs.Images.Invoke(new()
        {
            OsType = "Linux",
            Visibility = "public",
            InstanceTypeId = "ecs.g1.large",
        });
    
        var fooKeyPair = new Volcengine.Ecs.KeyPair("fooKeyPair", new()
        {
            Description = "acc-test-2",
            KeyPairName = "acc-test-key-pair-name",
        });
    
        var fooLaunchTemplate = new Volcengine.Ecs.LaunchTemplate("fooLaunchTemplate", new()
        {
            Description = "acc-test-desc",
            EipBandwidth = 200,
            EipBillingType = "PostPaidByBandwidth",
            EipIsp = "BGP",
            HostName = "acc-hostname",
            ImageId = fooImages.Apply(imagesResult => imagesResult.Images[0]?.ImageId),
            InstanceChargeType = "PostPaid",
            InstanceName = "acc-instance-name",
            InstanceTypeId = "ecs.g1.large",
            KeyPairName = fooKeyPair.KeyPairName,
            LaunchTemplateName = "acc-test-template",
            NetworkInterfaces = new[]
            {
                new Volcengine.Ecs.Inputs.LaunchTemplateNetworkInterfaceArgs
                {
                    SubnetId = fooSubnet.Id,
                    SecurityGroupIds = new[]
                    {
                        fooSecurityGroup.Id,
                    },
                },
            },
            Volumes = new[]
            {
                new Volcengine.Ecs.Inputs.LaunchTemplateVolumeArgs
                {
                    VolumeType = "ESSD_PL0",
                    Size = 50,
                    DeleteWithInstance = true,
                },
            },
        });
    
        var fooScalingGroup = new Volcengine.Autoscaling.ScalingGroup("fooScalingGroup", new()
        {
            ScalingGroupName = "acc-test-scaling-group",
            SubnetIds = new[]
            {
                fooSubnet.Id,
            },
            MultiAzPolicy = "BALANCE",
            DesireInstanceNumber = -1,
            MinInstanceNumber = 0,
            MaxInstanceNumber = 1,
            InstanceTerminatePolicy = "OldestInstance",
            DefaultCooldown = 10,
            LaunchTemplateId = fooLaunchTemplate.Id,
            LaunchTemplateVersion = "Default",
        });
    
        var fooScalingGroupEnabler = new Volcengine.Autoscaling.ScalingGroupEnabler("fooScalingGroupEnabler", new()
        {
            ScalingGroupId = fooScalingGroup.Id,
        });
    
        var fooInstance = new Volcengine.Ecs.Instance("fooInstance", new()
        {
            InstanceName = "acc-test-ecs",
            Description = "acc-test",
            HostName = "tf-acc-test",
            ImageId = fooImages.Apply(imagesResult => imagesResult.Images[0]?.ImageId),
            InstanceType = "ecs.g1.large",
            Password = "93f0cb0614Aab12",
            InstanceChargeType = "PostPaid",
            SystemVolumeType = "ESSD_PL0",
            SystemVolumeSize = 40,
            SubnetId = fooSubnet.Id,
            SecurityGroupIds = new[]
            {
                fooSecurityGroup.Id,
            },
        });
    
        var fooScalingInstanceAttachment = new Volcengine.Autoscaling.ScalingInstanceAttachment("fooScalingInstanceAttachment", new()
        {
            InstanceId = fooInstance.Id,
            ScalingGroupId = fooScalingGroup.Id,
            Entrusted = true,
        }, new CustomResourceOptions
        {
            DependsOn = new[]
            {
                fooScalingGroupEnabler,
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/autoscaling"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/ecs"
    	"github.com/volcengine/pulumi-volcengine/sdk/go/volcengine/vpc"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		fooZones, err := ecs.Zones(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		fooVpc, err := vpc.NewVpc(ctx, "fooVpc", &vpc.VpcArgs{
    			VpcName:   pulumi.String("acc-test-vpc"),
    			CidrBlock: pulumi.String("172.16.0.0/16"),
    		})
    		if err != nil {
    			return err
    		}
    		fooSubnet, err := vpc.NewSubnet(ctx, "fooSubnet", &vpc.SubnetArgs{
    			SubnetName: pulumi.String("acc-test-subnet"),
    			CidrBlock:  pulumi.String("172.16.0.0/24"),
    			ZoneId:     *pulumi.String(fooZones.Zones[0].Id),
    			VpcId:      fooVpc.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		fooSecurityGroup, err := vpc.NewSecurityGroup(ctx, "fooSecurityGroup", &vpc.SecurityGroupArgs{
    			SecurityGroupName: pulumi.String("acc-test-security-group"),
    			VpcId:             fooVpc.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		fooImages, err := ecs.Images(ctx, &ecs.ImagesArgs{
    			OsType:         pulumi.StringRef("Linux"),
    			Visibility:     pulumi.StringRef("public"),
    			InstanceTypeId: pulumi.StringRef("ecs.g1.large"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		fooKeyPair, err := ecs.NewKeyPair(ctx, "fooKeyPair", &ecs.KeyPairArgs{
    			Description: pulumi.String("acc-test-2"),
    			KeyPairName: pulumi.String("acc-test-key-pair-name"),
    		})
    		if err != nil {
    			return err
    		}
    		fooLaunchTemplate, err := ecs.NewLaunchTemplate(ctx, "fooLaunchTemplate", &ecs.LaunchTemplateArgs{
    			Description:        pulumi.String("acc-test-desc"),
    			EipBandwidth:       pulumi.Int(200),
    			EipBillingType:     pulumi.String("PostPaidByBandwidth"),
    			EipIsp:             pulumi.String("BGP"),
    			HostName:           pulumi.String("acc-hostname"),
    			ImageId:            *pulumi.String(fooImages.Images[0].ImageId),
    			InstanceChargeType: pulumi.String("PostPaid"),
    			InstanceName:       pulumi.String("acc-instance-name"),
    			InstanceTypeId:     pulumi.String("ecs.g1.large"),
    			KeyPairName:        fooKeyPair.KeyPairName,
    			LaunchTemplateName: pulumi.String("acc-test-template"),
    			NetworkInterfaces: ecs.LaunchTemplateNetworkInterfaceArray{
    				&ecs.LaunchTemplateNetworkInterfaceArgs{
    					SubnetId: fooSubnet.ID(),
    					SecurityGroupIds: pulumi.StringArray{
    						fooSecurityGroup.ID(),
    					},
    				},
    			},
    			Volumes: ecs.LaunchTemplateVolumeArray{
    				&ecs.LaunchTemplateVolumeArgs{
    					VolumeType:         pulumi.String("ESSD_PL0"),
    					Size:               pulumi.Int(50),
    					DeleteWithInstance: pulumi.Bool(true),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		fooScalingGroup, err := autoscaling.NewScalingGroup(ctx, "fooScalingGroup", &autoscaling.ScalingGroupArgs{
    			ScalingGroupName: pulumi.String("acc-test-scaling-group"),
    			SubnetIds: pulumi.StringArray{
    				fooSubnet.ID(),
    			},
    			MultiAzPolicy:           pulumi.String("BALANCE"),
    			DesireInstanceNumber:    -1,
    			MinInstanceNumber:       pulumi.Int(0),
    			MaxInstanceNumber:       pulumi.Int(1),
    			InstanceTerminatePolicy: pulumi.String("OldestInstance"),
    			DefaultCooldown:         pulumi.Int(10),
    			LaunchTemplateId:        fooLaunchTemplate.ID(),
    			LaunchTemplateVersion:   pulumi.String("Default"),
    		})
    		if err != nil {
    			return err
    		}
    		fooScalingGroupEnabler, err := autoscaling.NewScalingGroupEnabler(ctx, "fooScalingGroupEnabler", &autoscaling.ScalingGroupEnablerArgs{
    			ScalingGroupId: fooScalingGroup.ID(),
    		})
    		if err != nil {
    			return err
    		}
    		fooInstance, err := ecs.NewInstance(ctx, "fooInstance", &ecs.InstanceArgs{
    			InstanceName:       pulumi.String("acc-test-ecs"),
    			Description:        pulumi.String("acc-test"),
    			HostName:           pulumi.String("tf-acc-test"),
    			ImageId:            *pulumi.String(fooImages.Images[0].ImageId),
    			InstanceType:       pulumi.String("ecs.g1.large"),
    			Password:           pulumi.String("93f0cb0614Aab12"),
    			InstanceChargeType: pulumi.String("PostPaid"),
    			SystemVolumeType:   pulumi.String("ESSD_PL0"),
    			SystemVolumeSize:   pulumi.Int(40),
    			SubnetId:           fooSubnet.ID(),
    			SecurityGroupIds: pulumi.StringArray{
    				fooSecurityGroup.ID(),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = autoscaling.NewScalingInstanceAttachment(ctx, "fooScalingInstanceAttachment", &autoscaling.ScalingInstanceAttachmentArgs{
    			InstanceId:     fooInstance.ID(),
    			ScalingGroupId: fooScalingGroup.ID(),
    			Entrusted:      pulumi.Bool(true),
    		}, pulumi.DependsOn([]pulumi.Resource{
    			fooScalingGroupEnabler,
    		}))
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    

    Coming soon!

    import pulumi
    import pulumi_volcengine as volcengine
    
    foo_zones = volcengine.ecs.zones()
    foo_vpc = volcengine.vpc.Vpc("fooVpc",
        vpc_name="acc-test-vpc",
        cidr_block="172.16.0.0/16")
    foo_subnet = volcengine.vpc.Subnet("fooSubnet",
        subnet_name="acc-test-subnet",
        cidr_block="172.16.0.0/24",
        zone_id=foo_zones.zones[0].id,
        vpc_id=foo_vpc.id)
    foo_security_group = volcengine.vpc.SecurityGroup("fooSecurityGroup",
        security_group_name="acc-test-security-group",
        vpc_id=foo_vpc.id)
    foo_images = volcengine.ecs.images(os_type="Linux",
        visibility="public",
        instance_type_id="ecs.g1.large")
    foo_key_pair = volcengine.ecs.KeyPair("fooKeyPair",
        description="acc-test-2",
        key_pair_name="acc-test-key-pair-name")
    foo_launch_template = volcengine.ecs.LaunchTemplate("fooLaunchTemplate",
        description="acc-test-desc",
        eip_bandwidth=200,
        eip_billing_type="PostPaidByBandwidth",
        eip_isp="BGP",
        host_name="acc-hostname",
        image_id=foo_images.images[0].image_id,
        instance_charge_type="PostPaid",
        instance_name="acc-instance-name",
        instance_type_id="ecs.g1.large",
        key_pair_name=foo_key_pair.key_pair_name,
        launch_template_name="acc-test-template",
        network_interfaces=[volcengine.ecs.LaunchTemplateNetworkInterfaceArgs(
            subnet_id=foo_subnet.id,
            security_group_ids=[foo_security_group.id],
        )],
        volumes=[volcengine.ecs.LaunchTemplateVolumeArgs(
            volume_type="ESSD_PL0",
            size=50,
            delete_with_instance=True,
        )])
    foo_scaling_group = volcengine.autoscaling.ScalingGroup("fooScalingGroup",
        scaling_group_name="acc-test-scaling-group",
        subnet_ids=[foo_subnet.id],
        multi_az_policy="BALANCE",
        desire_instance_number=-1,
        min_instance_number=0,
        max_instance_number=1,
        instance_terminate_policy="OldestInstance",
        default_cooldown=10,
        launch_template_id=foo_launch_template.id,
        launch_template_version="Default")
    foo_scaling_group_enabler = volcengine.autoscaling.ScalingGroupEnabler("fooScalingGroupEnabler", scaling_group_id=foo_scaling_group.id)
    foo_instance = volcengine.ecs.Instance("fooInstance",
        instance_name="acc-test-ecs",
        description="acc-test",
        host_name="tf-acc-test",
        image_id=foo_images.images[0].image_id,
        instance_type="ecs.g1.large",
        password="93f0cb0614Aab12",
        instance_charge_type="PostPaid",
        system_volume_type="ESSD_PL0",
        system_volume_size=40,
        subnet_id=foo_subnet.id,
        security_group_ids=[foo_security_group.id])
    foo_scaling_instance_attachment = volcengine.autoscaling.ScalingInstanceAttachment("fooScalingInstanceAttachment",
        instance_id=foo_instance.id,
        scaling_group_id=foo_scaling_group.id,
        entrusted=True,
        opts=pulumi.ResourceOptions(depends_on=[foo_scaling_group_enabler]))
    
    import * as pulumi from "@pulumi/pulumi";
    import * as volcengine from "@pulumi/volcengine";
    import * as volcengine from "@volcengine/pulumi";
    
    const fooZones = volcengine.ecs.Zones({});
    const fooVpc = new volcengine.vpc.Vpc("fooVpc", {
        vpcName: "acc-test-vpc",
        cidrBlock: "172.16.0.0/16",
    });
    const fooSubnet = new volcengine.vpc.Subnet("fooSubnet", {
        subnetName: "acc-test-subnet",
        cidrBlock: "172.16.0.0/24",
        zoneId: fooZones.then(fooZones => fooZones.zones?.[0]?.id),
        vpcId: fooVpc.id,
    });
    const fooSecurityGroup = new volcengine.vpc.SecurityGroup("fooSecurityGroup", {
        securityGroupName: "acc-test-security-group",
        vpcId: fooVpc.id,
    });
    const fooImages = volcengine.ecs.Images({
        osType: "Linux",
        visibility: "public",
        instanceTypeId: "ecs.g1.large",
    });
    const fooKeyPair = new volcengine.ecs.KeyPair("fooKeyPair", {
        description: "acc-test-2",
        keyPairName: "acc-test-key-pair-name",
    });
    const fooLaunchTemplate = new volcengine.ecs.LaunchTemplate("fooLaunchTemplate", {
        description: "acc-test-desc",
        eipBandwidth: 200,
        eipBillingType: "PostPaidByBandwidth",
        eipIsp: "BGP",
        hostName: "acc-hostname",
        imageId: fooImages.then(fooImages => fooImages.images?.[0]?.imageId),
        instanceChargeType: "PostPaid",
        instanceName: "acc-instance-name",
        instanceTypeId: "ecs.g1.large",
        keyPairName: fooKeyPair.keyPairName,
        launchTemplateName: "acc-test-template",
        networkInterfaces: [{
            subnetId: fooSubnet.id,
            securityGroupIds: [fooSecurityGroup.id],
        }],
        volumes: [{
            volumeType: "ESSD_PL0",
            size: 50,
            deleteWithInstance: true,
        }],
    });
    const fooScalingGroup = new volcengine.autoscaling.ScalingGroup("fooScalingGroup", {
        scalingGroupName: "acc-test-scaling-group",
        subnetIds: [fooSubnet.id],
        multiAzPolicy: "BALANCE",
        desireInstanceNumber: -1,
        minInstanceNumber: 0,
        maxInstanceNumber: 1,
        instanceTerminatePolicy: "OldestInstance",
        defaultCooldown: 10,
        launchTemplateId: fooLaunchTemplate.id,
        launchTemplateVersion: "Default",
    });
    const fooScalingGroupEnabler = new volcengine.autoscaling.ScalingGroupEnabler("fooScalingGroupEnabler", {scalingGroupId: fooScalingGroup.id});
    const fooInstance = new volcengine.ecs.Instance("fooInstance", {
        instanceName: "acc-test-ecs",
        description: "acc-test",
        hostName: "tf-acc-test",
        imageId: fooImages.then(fooImages => fooImages.images?.[0]?.imageId),
        instanceType: "ecs.g1.large",
        password: "93f0cb0614Aab12",
        instanceChargeType: "PostPaid",
        systemVolumeType: "ESSD_PL0",
        systemVolumeSize: 40,
        subnetId: fooSubnet.id,
        securityGroupIds: [fooSecurityGroup.id],
    });
    const fooScalingInstanceAttachment = new volcengine.autoscaling.ScalingInstanceAttachment("fooScalingInstanceAttachment", {
        instanceId: fooInstance.id,
        scalingGroupId: fooScalingGroup.id,
        entrusted: true,
    }, {
        dependsOn: [fooScalingGroupEnabler],
    });
    

    Coming soon!

    Create ScalingInstanceAttachment Resource

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

    Constructor syntax

    new ScalingInstanceAttachment(name: string, args: ScalingInstanceAttachmentArgs, opts?: CustomResourceOptions);
    @overload
    def ScalingInstanceAttachment(resource_name: str,
                                  args: ScalingInstanceAttachmentArgs,
                                  opts: Optional[ResourceOptions] = None)
    
    @overload
    def ScalingInstanceAttachment(resource_name: str,
                                  opts: Optional[ResourceOptions] = None,
                                  instance_id: Optional[str] = None,
                                  scaling_group_id: Optional[str] = None,
                                  delete_type: Optional[str] = None,
                                  detach_option: Optional[str] = None,
                                  entrusted: Optional[bool] = None)
    func NewScalingInstanceAttachment(ctx *Context, name string, args ScalingInstanceAttachmentArgs, opts ...ResourceOption) (*ScalingInstanceAttachment, error)
    public ScalingInstanceAttachment(string name, ScalingInstanceAttachmentArgs args, CustomResourceOptions? opts = null)
    public ScalingInstanceAttachment(String name, ScalingInstanceAttachmentArgs args)
    public ScalingInstanceAttachment(String name, ScalingInstanceAttachmentArgs args, CustomResourceOptions options)
    
    type: volcengine:autoscaling:ScalingInstanceAttachment
    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 ScalingInstanceAttachmentArgs
    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 ScalingInstanceAttachmentArgs
    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 ScalingInstanceAttachmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ScalingInstanceAttachmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ScalingInstanceAttachmentArgs
    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 scalingInstanceAttachmentResource = new Volcengine.Autoscaling.ScalingInstanceAttachment("scalingInstanceAttachmentResource", new()
    {
        InstanceId = "string",
        ScalingGroupId = "string",
        DeleteType = "string",
        DetachOption = "string",
        Entrusted = false,
    });
    
    example, err := autoscaling.NewScalingInstanceAttachment(ctx, "scalingInstanceAttachmentResource", &autoscaling.ScalingInstanceAttachmentArgs{
    	InstanceId:     pulumi.String("string"),
    	ScalingGroupId: pulumi.String("string"),
    	DeleteType:     pulumi.String("string"),
    	DetachOption:   pulumi.String("string"),
    	Entrusted:      pulumi.Bool(false),
    })
    
    var scalingInstanceAttachmentResource = new ScalingInstanceAttachment("scalingInstanceAttachmentResource", ScalingInstanceAttachmentArgs.builder()
        .instanceId("string")
        .scalingGroupId("string")
        .deleteType("string")
        .detachOption("string")
        .entrusted(false)
        .build());
    
    scaling_instance_attachment_resource = volcengine.autoscaling.ScalingInstanceAttachment("scalingInstanceAttachmentResource",
        instance_id="string",
        scaling_group_id="string",
        delete_type="string",
        detach_option="string",
        entrusted=False)
    
    const scalingInstanceAttachmentResource = new volcengine.autoscaling.ScalingInstanceAttachment("scalingInstanceAttachmentResource", {
        instanceId: "string",
        scalingGroupId: "string",
        deleteType: "string",
        detachOption: "string",
        entrusted: false,
    });
    
    type: volcengine:autoscaling:ScalingInstanceAttachment
    properties:
        deleteType: string
        detachOption: string
        entrusted: false
        instanceId: string
        scalingGroupId: string
    

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

    InstanceId string
    The id of the instance.
    ScalingGroupId string
    The id of the scaling group.
    DeleteType string
    The type of delete activity. Valid values: Remove, Detach. Default value is Remove.
    DetachOption string
    Whether to cancel the association of the instance with the load balancing and public network IP. Valid values: both, none. Default value is both.
    Entrusted bool
    Whether to host the instance to a scaling group. Default value is false.
    InstanceId string
    The id of the instance.
    ScalingGroupId string
    The id of the scaling group.
    DeleteType string
    The type of delete activity. Valid values: Remove, Detach. Default value is Remove.
    DetachOption string
    Whether to cancel the association of the instance with the load balancing and public network IP. Valid values: both, none. Default value is both.
    Entrusted bool
    Whether to host the instance to a scaling group. Default value is false.
    instanceId String
    The id of the instance.
    scalingGroupId String
    The id of the scaling group.
    deleteType String
    The type of delete activity. Valid values: Remove, Detach. Default value is Remove.
    detachOption String
    Whether to cancel the association of the instance with the load balancing and public network IP. Valid values: both, none. Default value is both.
    entrusted Boolean
    Whether to host the instance to a scaling group. Default value is false.
    instanceId string
    The id of the instance.
    scalingGroupId string
    The id of the scaling group.
    deleteType string
    The type of delete activity. Valid values: Remove, Detach. Default value is Remove.
    detachOption string
    Whether to cancel the association of the instance with the load balancing and public network IP. Valid values: both, none. Default value is both.
    entrusted boolean
    Whether to host the instance to a scaling group. Default value is false.
    instance_id str
    The id of the instance.
    scaling_group_id str
    The id of the scaling group.
    delete_type str
    The type of delete activity. Valid values: Remove, Detach. Default value is Remove.
    detach_option str
    Whether to cancel the association of the instance with the load balancing and public network IP. Valid values: both, none. Default value is both.
    entrusted bool
    Whether to host the instance to a scaling group. Default value is false.
    instanceId String
    The id of the instance.
    scalingGroupId String
    The id of the scaling group.
    deleteType String
    The type of delete activity. Valid values: Remove, Detach. Default value is Remove.
    detachOption String
    Whether to cancel the association of the instance with the load balancing and public network IP. Valid values: both, none. Default value is both.
    entrusted Boolean
    Whether to host the instance to a scaling group. Default value is false.

    Outputs

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

    Get an existing ScalingInstanceAttachment 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?: ScalingInstanceAttachmentState, opts?: CustomResourceOptions): ScalingInstanceAttachment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            delete_type: Optional[str] = None,
            detach_option: Optional[str] = None,
            entrusted: Optional[bool] = None,
            instance_id: Optional[str] = None,
            scaling_group_id: Optional[str] = None) -> ScalingInstanceAttachment
    func GetScalingInstanceAttachment(ctx *Context, name string, id IDInput, state *ScalingInstanceAttachmentState, opts ...ResourceOption) (*ScalingInstanceAttachment, error)
    public static ScalingInstanceAttachment Get(string name, Input<string> id, ScalingInstanceAttachmentState? state, CustomResourceOptions? opts = null)
    public static ScalingInstanceAttachment get(String name, Output<String> id, ScalingInstanceAttachmentState 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:
    DeleteType string
    The type of delete activity. Valid values: Remove, Detach. Default value is Remove.
    DetachOption string
    Whether to cancel the association of the instance with the load balancing and public network IP. Valid values: both, none. Default value is both.
    Entrusted bool
    Whether to host the instance to a scaling group. Default value is false.
    InstanceId string
    The id of the instance.
    ScalingGroupId string
    The id of the scaling group.
    DeleteType string
    The type of delete activity. Valid values: Remove, Detach. Default value is Remove.
    DetachOption string
    Whether to cancel the association of the instance with the load balancing and public network IP. Valid values: both, none. Default value is both.
    Entrusted bool
    Whether to host the instance to a scaling group. Default value is false.
    InstanceId string
    The id of the instance.
    ScalingGroupId string
    The id of the scaling group.
    deleteType String
    The type of delete activity. Valid values: Remove, Detach. Default value is Remove.
    detachOption String
    Whether to cancel the association of the instance with the load balancing and public network IP. Valid values: both, none. Default value is both.
    entrusted Boolean
    Whether to host the instance to a scaling group. Default value is false.
    instanceId String
    The id of the instance.
    scalingGroupId String
    The id of the scaling group.
    deleteType string
    The type of delete activity. Valid values: Remove, Detach. Default value is Remove.
    detachOption string
    Whether to cancel the association of the instance with the load balancing and public network IP. Valid values: both, none. Default value is both.
    entrusted boolean
    Whether to host the instance to a scaling group. Default value is false.
    instanceId string
    The id of the instance.
    scalingGroupId string
    The id of the scaling group.
    delete_type str
    The type of delete activity. Valid values: Remove, Detach. Default value is Remove.
    detach_option str
    Whether to cancel the association of the instance with the load balancing and public network IP. Valid values: both, none. Default value is both.
    entrusted bool
    Whether to host the instance to a scaling group. Default value is false.
    instance_id str
    The id of the instance.
    scaling_group_id str
    The id of the scaling group.
    deleteType String
    The type of delete activity. Valid values: Remove, Detach. Default value is Remove.
    detachOption String
    Whether to cancel the association of the instance with the load balancing and public network IP. Valid values: both, none. Default value is both.
    entrusted Boolean
    Whether to host the instance to a scaling group. Default value is false.
    instanceId String
    The id of the instance.
    scalingGroupId String
    The id of the scaling group.

    Import

    Scaling instance attachment can be imported using the scaling_group_id and instance_id, e.g. You can choose to remove or detach the instance according to the delete_type field.

     $ pulumi import volcengine:autoscaling/scalingInstanceAttachment:ScalingInstanceAttachment default scg-mizl7m1kqccg5smt1bdpijuj:i-l8u2ai4j0fauo6mrpgk8
    

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

    Package Details

    Repository
    volcengine volcengine/pulumi-volcengine
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the volcengine Terraform Provider.
    volcengine logo
    Volcengine v0.0.26 published on Friday, Sep 13, 2024 by Volcengine