flexibleengine.AsInstanceAttach
Explore with Pulumi AI
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:
- Instance
Id 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.
- Scaling
Group stringId - 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 stringAttach Id - 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
As
Instance Attach Timeouts
- Instance
Id 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.
- Scaling
Group stringId - 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 stringAttach Id - 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
As
Instance Attach Timeouts Args
- instance
Id 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.
- scaling
Group StringId - Specifies the AS group ID. Changing this creates a new resource.
- append
Instance 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. - as
Instance StringAttach Id - 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
As
Instance Attach Timeouts
- instance
Id 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.
- scaling
Group stringId - Specifies the AS group ID. Changing this creates a new resource.
- append
Instance 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. - as
Instance stringAttach Id - 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
As
Instance Attach Timeouts
- 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_ strid - 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_ strattach_ id - 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
As
Instance Attach Timeouts Args
- instance
Id 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.
- scaling
Group StringId - Specifies the AS group ID. Changing this creates a new resource.
- append
Instance 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. - as
Instance StringAttach Id - 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:
- Health
Status string - The instance health status. The value can be
INITIALIZING
,NORMAL
orERROR
. - Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Name string - The ECS instance name.
- Status string
- The instance lifecycle status in the AS group. The value can be
INSERVICE
,STANDBY
,PENDING
orREMOVING
.
- Health
Status string - The instance health status. The value can be
INITIALIZING
,NORMAL
orERROR
. - Id string
- The provider-assigned unique ID for this managed resource.
- Instance
Name string - The ECS instance name.
- Status string
- The instance lifecycle status in the AS group. The value can be
INSERVICE
,STANDBY
,PENDING
orREMOVING
.
- health
Status String - The instance health status. The value can be
INITIALIZING
,NORMAL
orERROR
. - id String
- The provider-assigned unique ID for this managed resource.
- instance
Name String - The ECS instance name.
- status String
- The instance lifecycle status in the AS group. The value can be
INSERVICE
,STANDBY
,PENDING
orREMOVING
.
- health
Status string - The instance health status. The value can be
INITIALIZING
,NORMAL
orERROR
. - id string
- The provider-assigned unique ID for this managed resource.
- instance
Name string - The ECS instance name.
- status string
- The instance lifecycle status in the AS group. The value can be
INSERVICE
,STANDBY
,PENDING
orREMOVING
.
- health_
status str - The instance health status. The value can be
INITIALIZING
,NORMAL
orERROR
. - 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
orREMOVING
.
- health
Status String - The instance health status. The value can be
INITIALIZING
,NORMAL
orERROR
. - id String
- The provider-assigned unique ID for this managed resource.
- instance
Name String - The ECS instance name.
- status String
- The instance lifecycle status in the AS group. The value can be
INSERVICE
,STANDBY
,PENDING
orREMOVING
.
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.
- 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 stringAttach Id - The resource ID in format of
scaling_group_id
/instance_id
. - Health
Status string - The instance health status. The value can be
INITIALIZING
,NORMAL
orERROR
. - Instance
Id 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.
- Instance
Name 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.
- Scaling
Group stringId - 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
orREMOVING
. - Timeouts
As
Instance Attach Timeouts
- 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 stringAttach Id - The resource ID in format of
scaling_group_id
/instance_id
. - Health
Status string - The instance health status. The value can be
INITIALIZING
,NORMAL
orERROR
. - Instance
Id 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.
- Instance
Name 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.
- Scaling
Group stringId - 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
orREMOVING
. - Timeouts
As
Instance Attach Timeouts Args
- append
Instance 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. - as
Instance StringAttach Id - The resource ID in format of
scaling_group_id
/instance_id
. - health
Status String - The instance health status. The value can be
INITIALIZING
,NORMAL
orERROR
. - instance
Id 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.
- instance
Name 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.
- scaling
Group StringId - 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
orREMOVING
. - timeouts
As
Instance Attach Timeouts
- append
Instance 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. - as
Instance stringAttach Id - The resource ID in format of
scaling_group_id
/instance_id
. - health
Status string - The instance health status. The value can be
INITIALIZING
,NORMAL
orERROR
. - instance
Id 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.
- instance
Name 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.
- scaling
Group stringId - 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
orREMOVING
. - timeouts
As
Instance Attach Timeouts
- 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_ strattach_ id - The resource ID in format of
scaling_group_id
/instance_id
. - health_
status str - The instance health status. The value can be
INITIALIZING
,NORMAL
orERROR
. - 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_ strid - 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
orREMOVING
. - timeouts
As
Instance Attach Timeouts Args
- append
Instance 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. - as
Instance StringAttach Id - The resource ID in format of
scaling_group_id
/instance_id
. - health
Status String - The instance health status. The value can be
INITIALIZING
,NORMAL
orERROR
. - instance
Id 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.
- instance
Name 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.
- scaling
Group StringId - 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
orREMOVING
. - timeouts Property Map
Supporting Types
AsInstanceAttachTimeouts, AsInstanceAttachTimeoutsArgs
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.