1. Packages
  2. Flexibleengine Provider
  3. API Docs
  4. AsInstanceAttach
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud

flexibleengine.AsInstanceAttach

Explore with Pulumi AI

flexibleengine logo
flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud

    Manages an AS instance attachment resource within FlexibleEngine.

    Example Usage

    Add an instance

    import * as pulumi from "@pulumi/pulumi";
    import * as flexibleengine from "@pulumi/flexibleengine";
    
    const config = new pulumi.Config();
    const scalingGroupId = config.requireObject("scalingGroupId");
    const ecsId = config.requireObject("ecsId");
    const test = new flexibleengine.AsInstanceAttach("test", {
        scalingGroupId: scalingGroupId,
        instanceId: ecsId,
    });
    
    import pulumi
    import pulumi_flexibleengine as flexibleengine
    
    config = pulumi.Config()
    scaling_group_id = config.require_object("scalingGroupId")
    ecs_id = config.require_object("ecsId")
    test = flexibleengine.AsInstanceAttach("test",
        scaling_group_id=scaling_group_id,
        instance_id=ecs_id)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
    	"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, "")
    		scalingGroupId := cfg.RequireObject("scalingGroupId")
    		ecsId := cfg.RequireObject("ecsId")
    		_, err := flexibleengine.NewAsInstanceAttach(ctx, "test", &flexibleengine.AsInstanceAttachArgs{
    			ScalingGroupId: pulumi.Any(scalingGroupId),
    			InstanceId:     pulumi.Any(ecsId),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Flexibleengine = Pulumi.Flexibleengine;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var scalingGroupId = config.RequireObject<dynamic>("scalingGroupId");
        var ecsId = config.RequireObject<dynamic>("ecsId");
        var test = new Flexibleengine.AsInstanceAttach("test", new()
        {
            ScalingGroupId = scalingGroupId,
            InstanceId = ecsId,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.flexibleengine.AsInstanceAttach;
    import com.pulumi.flexibleengine.AsInstanceAttachArgs;
    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 scalingGroupId = config.get("scalingGroupId");
            final var ecsId = config.get("ecsId");
            var test = new AsInstanceAttach("test", AsInstanceAttachArgs.builder()
                .scalingGroupId(scalingGroupId)
                .instanceId(ecsId)
                .build());
    
        }
    }
    
    configuration:
      scalingGroupId:
        type: dynamic
      ecsId:
        type: dynamic
    resources:
      test:
        type: flexibleengine:AsInstanceAttach
        properties:
          scalingGroupId: ${scalingGroupId}
          instanceId: ${ecsId}
    

    Add an instance with protection

    import * as pulumi from "@pulumi/pulumi";
    import * as flexibleengine from "@pulumi/flexibleengine";
    
    const config = new pulumi.Config();
    const scalingGroupId = config.requireObject("scalingGroupId");
    const ecsId = config.requireObject("ecsId");
    const test = new flexibleengine.AsInstanceAttach("test", {
        scalingGroupId: scalingGroupId,
        instanceId: ecsId,
        "protected": true,
    });
    
    import pulumi
    import pulumi_flexibleengine as flexibleengine
    
    config = pulumi.Config()
    scaling_group_id = config.require_object("scalingGroupId")
    ecs_id = config.require_object("ecsId")
    test = flexibleengine.AsInstanceAttach("test",
        scaling_group_id=scaling_group_id,
        instance_id=ecs_id,
        protected=True)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/flexibleengine/flexibleengine"
    	"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, "")
    		scalingGroupId := cfg.RequireObject("scalingGroupId")
    		ecsId := cfg.RequireObject("ecsId")
    		_, err := flexibleengine.NewAsInstanceAttach(ctx, "test", &flexibleengine.AsInstanceAttachArgs{
    			ScalingGroupId: pulumi.Any(scalingGroupId),
    			InstanceId:     pulumi.Any(ecsId),
    			Protected:      pulumi.Bool(true),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Flexibleengine = Pulumi.Flexibleengine;
    
    return await Deployment.RunAsync(() => 
    {
        var config = new Config();
        var scalingGroupId = config.RequireObject<dynamic>("scalingGroupId");
        var ecsId = config.RequireObject<dynamic>("ecsId");
        var test = new Flexibleengine.AsInstanceAttach("test", new()
        {
            ScalingGroupId = scalingGroupId,
            InstanceId = ecsId,
            Protected = true,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.flexibleengine.AsInstanceAttach;
    import com.pulumi.flexibleengine.AsInstanceAttachArgs;
    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 scalingGroupId = config.get("scalingGroupId");
            final var ecsId = config.get("ecsId");
            var test = new AsInstanceAttach("test", AsInstanceAttachArgs.builder()
                .scalingGroupId(scalingGroupId)
                .instanceId(ecsId)
                .protected_(true)
                .build());
    
        }
    }
    
    configuration:
      scalingGroupId:
        type: dynamic
      ecsId:
        type: dynamic
    resources:
      test:
        type: flexibleengine:AsInstanceAttach
        properties:
          scalingGroupId: ${scalingGroupId}
          instanceId: ${ecsId}
          protected: true
    

    Create AsInstanceAttach Resource

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

    Constructor syntax

    new AsInstanceAttach(name: string, args: AsInstanceAttachArgs, opts?: CustomResourceOptions);
    @overload
    def AsInstanceAttach(resource_name: str,
                         args: AsInstanceAttachArgs,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def AsInstanceAttach(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         instance_id: Optional[str] = None,
                         scaling_group_id: Optional[str] = None,
                         append_instance: Optional[bool] = None,
                         as_instance_attach_id: Optional[str] = None,
                         protected: Optional[bool] = None,
                         region: Optional[str] = None,
                         standby: Optional[bool] = None,
                         timeouts: Optional[AsInstanceAttachTimeoutsArgs] = None)
    func NewAsInstanceAttach(ctx *Context, name string, args AsInstanceAttachArgs, opts ...ResourceOption) (*AsInstanceAttach, error)
    public AsInstanceAttach(string name, AsInstanceAttachArgs args, CustomResourceOptions? opts = null)
    public AsInstanceAttach(String name, AsInstanceAttachArgs args)
    public AsInstanceAttach(String name, AsInstanceAttachArgs args, CustomResourceOptions options)
    
    type: flexibleengine:AsInstanceAttach
    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 AsInstanceAttachArgs
    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 AsInstanceAttachArgs
    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 AsInstanceAttachArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args AsInstanceAttachArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args AsInstanceAttachArgs
    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 asInstanceAttachResource = new Flexibleengine.AsInstanceAttach("asInstanceAttachResource", new()
    {
        InstanceId = "string",
        ScalingGroupId = "string",
        AppendInstance = false,
        AsInstanceAttachId = "string",
        Protected = false,
        Region = "string",
        Standby = false,
        Timeouts = new Flexibleengine.Inputs.AsInstanceAttachTimeoutsArgs
        {
            Create = "string",
            Delete = "string",
            Update = "string",
        },
    });
    
    example, err := flexibleengine.NewAsInstanceAttach(ctx, "asInstanceAttachResource", &flexibleengine.AsInstanceAttachArgs{
    	InstanceId:         pulumi.String("string"),
    	ScalingGroupId:     pulumi.String("string"),
    	AppendInstance:     pulumi.Bool(false),
    	AsInstanceAttachId: pulumi.String("string"),
    	Protected:          pulumi.Bool(false),
    	Region:             pulumi.String("string"),
    	Standby:            pulumi.Bool(false),
    	Timeouts: &flexibleengine.AsInstanceAttachTimeoutsArgs{
    		Create: pulumi.String("string"),
    		Delete: pulumi.String("string"),
    		Update: pulumi.String("string"),
    	},
    })
    
    var asInstanceAttachResource = new AsInstanceAttach("asInstanceAttachResource", AsInstanceAttachArgs.builder()
        .instanceId("string")
        .scalingGroupId("string")
        .appendInstance(false)
        .asInstanceAttachId("string")
        .protected_(false)
        .region("string")
        .standby(false)
        .timeouts(AsInstanceAttachTimeoutsArgs.builder()
            .create("string")
            .delete("string")
            .update("string")
            .build())
        .build());
    
    as_instance_attach_resource = flexibleengine.AsInstanceAttach("asInstanceAttachResource",
        instance_id="string",
        scaling_group_id="string",
        append_instance=False,
        as_instance_attach_id="string",
        protected=False,
        region="string",
        standby=False,
        timeouts={
            "create": "string",
            "delete": "string",
            "update": "string",
        })
    
    const asInstanceAttachResource = new flexibleengine.AsInstanceAttach("asInstanceAttachResource", {
        instanceId: "string",
        scalingGroupId: "string",
        appendInstance: false,
        asInstanceAttachId: "string",
        "protected": false,
        region: "string",
        standby: false,
        timeouts: {
            create: "string",
            "delete": "string",
            update: "string",
        },
    });
    
    type: flexibleengine:AsInstanceAttach
    properties:
        appendInstance: false
        asInstanceAttachId: string
        instanceId: string
        protected: false
        region: string
        scalingGroupId: string
        standby: false
        timeouts:
            create: string
            delete: string
            update: string
    

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

    InstanceId string

    Specifies the ECS instance ID. Changing this creates a new resource.

    Before adding instances to an AS group, ensure that the following conditions are met: 1. The instance is not in other AS groups. 2. The instance is in the same VPC as the AS group. 3. The instance is in the AZs used by the AS group. 4. After the instance is added, the total number of instances is less than or equal to the maximum number of instances allowed.

    ScalingGroupId string
    Specifies the AS group ID. Changing this creates a new resource.
    AppendInstance bool
    Specifies whether to add a new instance when the instance enter standby mode. This parameter takes effect only when standby is set to true.
    AsInstanceAttachId string
    The resource ID in format of scaling_group_id/instance_id.
    Protected bool
    Specifies whether the instance can be removed automatically from the AS group. Once configured, when AS automatically scales in the AS group, the instance that is protected will not be removed.
    Region string
    Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this creates a new resource.
    Standby bool
    Specifies whether to stop distributing traffic to the instance but do not want to remove it from the AS group. You can stop or restart the instance without worrying about it will be removed from the AS group.
    Timeouts AsInstanceAttachTimeouts
    InstanceId string

    Specifies the ECS instance ID. Changing this creates a new resource.

    Before adding instances to an AS group, ensure that the following conditions are met: 1. The instance is not in other AS groups. 2. The instance is in the same VPC as the AS group. 3. The instance is in the AZs used by the AS group. 4. After the instance is added, the total number of instances is less than or equal to the maximum number of instances allowed.

    ScalingGroupId string
    Specifies the AS group ID. Changing this creates a new resource.
    AppendInstance bool
    Specifies whether to add a new instance when the instance enter standby mode. This parameter takes effect only when standby is set to true.
    AsInstanceAttachId string
    The resource ID in format of scaling_group_id/instance_id.
    Protected bool
    Specifies whether the instance can be removed automatically from the AS group. Once configured, when AS automatically scales in the AS group, the instance that is protected will not be removed.
    Region string
    Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this creates a new resource.
    Standby bool
    Specifies whether to stop distributing traffic to the instance but do not want to remove it from the AS group. You can stop or restart the instance without worrying about it will be removed from the AS group.
    Timeouts AsInstanceAttachTimeoutsArgs
    instanceId String

    Specifies the ECS instance ID. Changing this creates a new resource.

    Before adding instances to an AS group, ensure that the following conditions are met: 1. The instance is not in other AS groups. 2. The instance is in the same VPC as the AS group. 3. The instance is in the AZs used by the AS group. 4. After the instance is added, the total number of instances is less than or equal to the maximum number of instances allowed.

    scalingGroupId String
    Specifies the AS group ID. Changing this creates a new resource.
    appendInstance Boolean
    Specifies whether to add a new instance when the instance enter standby mode. This parameter takes effect only when standby is set to true.
    asInstanceAttachId String
    The resource ID in format of scaling_group_id/instance_id.
    protected_ Boolean
    Specifies whether the instance can be removed automatically from the AS group. Once configured, when AS automatically scales in the AS group, the instance that is protected will not be removed.
    region String
    Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this creates a new resource.
    standby Boolean
    Specifies whether to stop distributing traffic to the instance but do not want to remove it from the AS group. You can stop or restart the instance without worrying about it will be removed from the AS group.
    timeouts AsInstanceAttachTimeouts
    instanceId string

    Specifies the ECS instance ID. Changing this creates a new resource.

    Before adding instances to an AS group, ensure that the following conditions are met: 1. The instance is not in other AS groups. 2. The instance is in the same VPC as the AS group. 3. The instance is in the AZs used by the AS group. 4. After the instance is added, the total number of instances is less than or equal to the maximum number of instances allowed.

    scalingGroupId string
    Specifies the AS group ID. Changing this creates a new resource.
    appendInstance boolean
    Specifies whether to add a new instance when the instance enter standby mode. This parameter takes effect only when standby is set to true.
    asInstanceAttachId string
    The resource ID in format of scaling_group_id/instance_id.
    protected boolean
    Specifies whether the instance can be removed automatically from the AS group. Once configured, when AS automatically scales in the AS group, the instance that is protected will not be removed.
    region string
    Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this creates a new resource.
    standby boolean
    Specifies whether to stop distributing traffic to the instance but do not want to remove it from the AS group. You can stop or restart the instance without worrying about it will be removed from the AS group.
    timeouts AsInstanceAttachTimeouts
    instance_id str

    Specifies the ECS instance ID. Changing this creates a new resource.

    Before adding instances to an AS group, ensure that the following conditions are met: 1. The instance is not in other AS groups. 2. The instance is in the same VPC as the AS group. 3. The instance is in the AZs used by the AS group. 4. After the instance is added, the total number of instances is less than or equal to the maximum number of instances allowed.

    scaling_group_id str
    Specifies the AS group ID. Changing this creates a new resource.
    append_instance bool
    Specifies whether to add a new instance when the instance enter standby mode. This parameter takes effect only when standby is set to true.
    as_instance_attach_id str
    The resource ID in format of scaling_group_id/instance_id.
    protected bool
    Specifies whether the instance can be removed automatically from the AS group. Once configured, when AS automatically scales in the AS group, the instance that is protected will not be removed.
    region str
    Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this creates a new resource.
    standby bool
    Specifies whether to stop distributing traffic to the instance but do not want to remove it from the AS group. You can stop or restart the instance without worrying about it will be removed from the AS group.
    timeouts AsInstanceAttachTimeoutsArgs
    instanceId String

    Specifies the ECS instance ID. Changing this creates a new resource.

    Before adding instances to an AS group, ensure that the following conditions are met: 1. The instance is not in other AS groups. 2. The instance is in the same VPC as the AS group. 3. The instance is in the AZs used by the AS group. 4. After the instance is added, the total number of instances is less than or equal to the maximum number of instances allowed.

    scalingGroupId String
    Specifies the AS group ID. Changing this creates a new resource.
    appendInstance Boolean
    Specifies whether to add a new instance when the instance enter standby mode. This parameter takes effect only when standby is set to true.
    asInstanceAttachId String
    The resource ID in format of scaling_group_id/instance_id.
    protected Boolean
    Specifies whether the instance can be removed automatically from the AS group. Once configured, when AS automatically scales in the AS group, the instance that is protected will not be removed.
    region String
    Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this creates a new resource.
    standby Boolean
    Specifies whether to stop distributing traffic to the instance but do not want to remove it from the AS group. You can stop or restart the instance without worrying about it will be removed from the AS group.
    timeouts Property Map

    Outputs

    All input properties are implicitly available as output properties. Additionally, the AsInstanceAttach resource produces the following output properties:

    HealthStatus string
    The instance health status. The value can be INITIALIZING, NORMAL or ERROR.
    Id string
    The provider-assigned unique ID for this managed resource.
    InstanceName string
    The ECS instance name.
    Status string
    The instance lifecycle status in the AS group. The value can be INSERVICE, STANDBY, PENDING or REMOVING.
    HealthStatus string
    The instance health status. The value can be INITIALIZING, NORMAL or ERROR.
    Id string
    The provider-assigned unique ID for this managed resource.
    InstanceName string
    The ECS instance name.
    Status string
    The instance lifecycle status in the AS group. The value can be INSERVICE, STANDBY, PENDING or REMOVING.
    healthStatus String
    The instance health status. The value can be INITIALIZING, NORMAL or ERROR.
    id String
    The provider-assigned unique ID for this managed resource.
    instanceName String
    The ECS instance name.
    status String
    The instance lifecycle status in the AS group. The value can be INSERVICE, STANDBY, PENDING or REMOVING.
    healthStatus string
    The instance health status. The value can be INITIALIZING, NORMAL or ERROR.
    id string
    The provider-assigned unique ID for this managed resource.
    instanceName string
    The ECS instance name.
    status string
    The instance lifecycle status in the AS group. The value can be INSERVICE, STANDBY, PENDING or REMOVING.
    health_status str
    The instance health status. The value can be INITIALIZING, NORMAL or ERROR.
    id str
    The provider-assigned unique ID for this managed resource.
    instance_name str
    The ECS instance name.
    status str
    The instance lifecycle status in the AS group. The value can be INSERVICE, STANDBY, PENDING or REMOVING.
    healthStatus String
    The instance health status. The value can be INITIALIZING, NORMAL or ERROR.
    id String
    The provider-assigned unique ID for this managed resource.
    instanceName String
    The ECS instance name.
    status String
    The instance lifecycle status in the AS group. The value can be INSERVICE, STANDBY, PENDING or REMOVING.

    Look up Existing AsInstanceAttach Resource

    Get an existing AsInstanceAttach 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?: AsInstanceAttachState, opts?: CustomResourceOptions): AsInstanceAttach
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            append_instance: Optional[bool] = None,
            as_instance_attach_id: Optional[str] = None,
            health_status: Optional[str] = None,
            instance_id: Optional[str] = None,
            instance_name: Optional[str] = None,
            protected: Optional[bool] = None,
            region: Optional[str] = None,
            scaling_group_id: Optional[str] = None,
            standby: Optional[bool] = None,
            status: Optional[str] = None,
            timeouts: Optional[AsInstanceAttachTimeoutsArgs] = None) -> AsInstanceAttach
    func GetAsInstanceAttach(ctx *Context, name string, id IDInput, state *AsInstanceAttachState, opts ...ResourceOption) (*AsInstanceAttach, error)
    public static AsInstanceAttach Get(string name, Input<string> id, AsInstanceAttachState? state, CustomResourceOptions? opts = null)
    public static AsInstanceAttach get(String name, Output<String> id, AsInstanceAttachState state, CustomResourceOptions options)
    resources:  _:    type: flexibleengine:AsInstanceAttach    get:      id: ${id}
    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:
    AppendInstance bool
    Specifies whether to add a new instance when the instance enter standby mode. This parameter takes effect only when standby is set to true.
    AsInstanceAttachId string
    The resource ID in format of scaling_group_id/instance_id.
    HealthStatus string
    The instance health status. The value can be INITIALIZING, NORMAL or ERROR.
    InstanceId string

    Specifies the ECS instance ID. Changing this creates a new resource.

    Before adding instances to an AS group, ensure that the following conditions are met: 1. The instance is not in other AS groups. 2. The instance is in the same VPC as the AS group. 3. The instance is in the AZs used by the AS group. 4. After the instance is added, the total number of instances is less than or equal to the maximum number of instances allowed.

    InstanceName string
    The ECS instance name.
    Protected bool
    Specifies whether the instance can be removed automatically from the AS group. Once configured, when AS automatically scales in the AS group, the instance that is protected will not be removed.
    Region string
    Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this creates a new resource.
    ScalingGroupId string
    Specifies the AS group ID. Changing this creates a new resource.
    Standby bool
    Specifies whether to stop distributing traffic to the instance but do not want to remove it from the AS group. You can stop or restart the instance without worrying about it will be removed from the AS group.
    Status string
    The instance lifecycle status in the AS group. The value can be INSERVICE, STANDBY, PENDING or REMOVING.
    Timeouts AsInstanceAttachTimeouts
    AppendInstance bool
    Specifies whether to add a new instance when the instance enter standby mode. This parameter takes effect only when standby is set to true.
    AsInstanceAttachId string
    The resource ID in format of scaling_group_id/instance_id.
    HealthStatus string
    The instance health status. The value can be INITIALIZING, NORMAL or ERROR.
    InstanceId string

    Specifies the ECS instance ID. Changing this creates a new resource.

    Before adding instances to an AS group, ensure that the following conditions are met: 1. The instance is not in other AS groups. 2. The instance is in the same VPC as the AS group. 3. The instance is in the AZs used by the AS group. 4. After the instance is added, the total number of instances is less than or equal to the maximum number of instances allowed.

    InstanceName string
    The ECS instance name.
    Protected bool
    Specifies whether the instance can be removed automatically from the AS group. Once configured, when AS automatically scales in the AS group, the instance that is protected will not be removed.
    Region string
    Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this creates a new resource.
    ScalingGroupId string
    Specifies the AS group ID. Changing this creates a new resource.
    Standby bool
    Specifies whether to stop distributing traffic to the instance but do not want to remove it from the AS group. You can stop or restart the instance without worrying about it will be removed from the AS group.
    Status string
    The instance lifecycle status in the AS group. The value can be INSERVICE, STANDBY, PENDING or REMOVING.
    Timeouts AsInstanceAttachTimeoutsArgs
    appendInstance Boolean
    Specifies whether to add a new instance when the instance enter standby mode. This parameter takes effect only when standby is set to true.
    asInstanceAttachId String
    The resource ID in format of scaling_group_id/instance_id.
    healthStatus String
    The instance health status. The value can be INITIALIZING, NORMAL or ERROR.
    instanceId String

    Specifies the ECS instance ID. Changing this creates a new resource.

    Before adding instances to an AS group, ensure that the following conditions are met: 1. The instance is not in other AS groups. 2. The instance is in the same VPC as the AS group. 3. The instance is in the AZs used by the AS group. 4. After the instance is added, the total number of instances is less than or equal to the maximum number of instances allowed.

    instanceName String
    The ECS instance name.
    protected_ Boolean
    Specifies whether the instance can be removed automatically from the AS group. Once configured, when AS automatically scales in the AS group, the instance that is protected will not be removed.
    region String
    Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this creates a new resource.
    scalingGroupId String
    Specifies the AS group ID. Changing this creates a new resource.
    standby Boolean
    Specifies whether to stop distributing traffic to the instance but do not want to remove it from the AS group. You can stop or restart the instance without worrying about it will be removed from the AS group.
    status String
    The instance lifecycle status in the AS group. The value can be INSERVICE, STANDBY, PENDING or REMOVING.
    timeouts AsInstanceAttachTimeouts
    appendInstance boolean
    Specifies whether to add a new instance when the instance enter standby mode. This parameter takes effect only when standby is set to true.
    asInstanceAttachId string
    The resource ID in format of scaling_group_id/instance_id.
    healthStatus string
    The instance health status. The value can be INITIALIZING, NORMAL or ERROR.
    instanceId string

    Specifies the ECS instance ID. Changing this creates a new resource.

    Before adding instances to an AS group, ensure that the following conditions are met: 1. The instance is not in other AS groups. 2. The instance is in the same VPC as the AS group. 3. The instance is in the AZs used by the AS group. 4. After the instance is added, the total number of instances is less than or equal to the maximum number of instances allowed.

    instanceName string
    The ECS instance name.
    protected boolean
    Specifies whether the instance can be removed automatically from the AS group. Once configured, when AS automatically scales in the AS group, the instance that is protected will not be removed.
    region string
    Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this creates a new resource.
    scalingGroupId string
    Specifies the AS group ID. Changing this creates a new resource.
    standby boolean
    Specifies whether to stop distributing traffic to the instance but do not want to remove it from the AS group. You can stop or restart the instance without worrying about it will be removed from the AS group.
    status string
    The instance lifecycle status in the AS group. The value can be INSERVICE, STANDBY, PENDING or REMOVING.
    timeouts AsInstanceAttachTimeouts
    append_instance bool
    Specifies whether to add a new instance when the instance enter standby mode. This parameter takes effect only when standby is set to true.
    as_instance_attach_id str
    The resource ID in format of scaling_group_id/instance_id.
    health_status str
    The instance health status. The value can be INITIALIZING, NORMAL or ERROR.
    instance_id str

    Specifies the ECS instance ID. Changing this creates a new resource.

    Before adding instances to an AS group, ensure that the following conditions are met: 1. The instance is not in other AS groups. 2. The instance is in the same VPC as the AS group. 3. The instance is in the AZs used by the AS group. 4. After the instance is added, the total number of instances is less than or equal to the maximum number of instances allowed.

    instance_name str
    The ECS instance name.
    protected bool
    Specifies whether the instance can be removed automatically from the AS group. Once configured, when AS automatically scales in the AS group, the instance that is protected will not be removed.
    region str
    Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this creates a new resource.
    scaling_group_id str
    Specifies the AS group ID. Changing this creates a new resource.
    standby bool
    Specifies whether to stop distributing traffic to the instance but do not want to remove it from the AS group. You can stop or restart the instance without worrying about it will be removed from the AS group.
    status str
    The instance lifecycle status in the AS group. The value can be INSERVICE, STANDBY, PENDING or REMOVING.
    timeouts AsInstanceAttachTimeoutsArgs
    appendInstance Boolean
    Specifies whether to add a new instance when the instance enter standby mode. This parameter takes effect only when standby is set to true.
    asInstanceAttachId String
    The resource ID in format of scaling_group_id/instance_id.
    healthStatus String
    The instance health status. The value can be INITIALIZING, NORMAL or ERROR.
    instanceId String

    Specifies the ECS instance ID. Changing this creates a new resource.

    Before adding instances to an AS group, ensure that the following conditions are met: 1. The instance is not in other AS groups. 2. The instance is in the same VPC as the AS group. 3. The instance is in the AZs used by the AS group. 4. After the instance is added, the total number of instances is less than or equal to the maximum number of instances allowed.

    instanceName String
    The ECS instance name.
    protected Boolean
    Specifies whether the instance can be removed automatically from the AS group. Once configured, when AS automatically scales in the AS group, the instance that is protected will not be removed.
    region String
    Specifies the region in which to create the resource. If omitted, the provider-level region will be used. Changing this creates a new resource.
    scalingGroupId String
    Specifies the AS group ID. Changing this creates a new resource.
    standby Boolean
    Specifies whether to stop distributing traffic to the instance but do not want to remove it from the AS group. You can stop or restart the instance without worrying about it will be removed from the AS group.
    status String
    The instance lifecycle status in the AS group. The value can be INSERVICE, STANDBY, PENDING or REMOVING.
    timeouts Property Map

    Supporting Types

    AsInstanceAttachTimeouts, AsInstanceAttachTimeoutsArgs

    Create string
    Delete string
    Update string
    Create string
    Delete string
    Update string
    create String
    delete String
    update String
    create string
    delete string
    update string
    create str
    delete str
    update str
    create String
    delete String
    update String

    Import

    The AS instances can be imported by the scaling_group_id and instance_id, separated by a slash, e.g.

    bash

    $ pulumi import flexibleengine:index/asInstanceAttach:AsInstanceAttach test <scaling_group_id>/<instance_id>
    

    Note that the imported state may not be identical to your resource definition, due to append_instance is missing from

    the API response.

    It is generally recommended running pulumi preview after importing the resource.

    You can then decide if changes should be applied to the resource, or the resource definition should be updated to

    align with the resource. Also you can ignore changes as below.

    hcl

    resource “flexibleengine_as_instance_attach” “test” {

    lifecycle {

    ignore_changes = [append_instance]
    

    }

    }

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

    Package Details

    Repository
    flexibleengine flexibleenginecloud/terraform-provider-flexibleengine
    License
    Notes
    This Pulumi package is based on the flexibleengine Terraform Provider.
    flexibleengine logo
    flexibleengine 1.46.0 published on Monday, Apr 14, 2025 by flexibleenginecloud