alicloud_eais_instance
Provides a EAIS Instance resource.
Instance resource definition.
For information about EAIS Instance and how to use it, see What is Instance.
-> NOTE: Available since v1.137.0.
Example Usage
Basic Usage
variable "name" {
default = "terraform-example"
}
provider "alicloud" {
region = "cn-hangzhou"
}
locals {
zone_id = "cn-hangzhou-h"
}
resource "alicloud_vpc" "default" {
vpc_name = var.name
cidr_block = "192.168.0.0/16"
}
resource "alicloud_vswitch" "default" {
vswitch_name = var.name
vpc_id = alicloud_vpc.default.id
cidr_block = "192.168.192.0/24"
zone_id = local.zone_id
}
resource "alicloud_security_group" "default" {
name = var.name
vpc_id = alicloud_vpc.default.id
}
resource "alicloud_eais_instance" "default" {
instance_type = "eais.ei-a6.2xlarge"
vswitch_id = alicloud_vswitch.default.id
security_group_id = alicloud_security_group.default.id
instance_name = var.name
}
Deleting alicloud_eais_instance
or removing it from your configuration
The alicloud_eais_instance
resource allows you to manage category = "ei"
instance, but Terraform cannot destroy it.
Deleting the subscription resource or removing it from your configuration will remove it from your state file and management, but will not destroy the Instance.
You can resume managing the subscription instance via the AlibabaCloud Console.
Argument Reference
The following arguments are supported:
category
- (Optional) EAIS instance category, valid values:eais
,jupyter
,ei
, default iseais
.environment_var
- (Optional, List, Available since v1.246.0) Setting environment variables in eais instance on Initialization Seeenvironment_var
below.force
- (Optional, Deprecated since v1.246.0) Whether to force the deletion when the instance status does not meet the deletion conditions.image
- (Optional, Available since v1.246.0) EAIS instance image.instance_name
- (Optional, ForceNew) Name of the instanceinstance_type
- (Required, ForceNew) EAIS instance typeresource_group_id
- (Optional, Computed, Available since v1.246.0) The ID of the resource groupsecurity_group_id
- (Required, ForceNew) Security group IDstatus
- (Optional, Computed) The status of the resourcetags
- (Optional, Map, Available since v1.246.0) The tags.vswitch_id
- (Required, ForceNew) Switch ID.
environment_var
The environment_var supports the following:
key
- (Optional, Available since v1.246.0) Keys for environment variablesvalue
- (Optional, Available since v1.246.0) Values of environment variables
Attributes Reference
The following attributes are exported:
id
- The ID of the resource supplied above.create_time
- The creation time of the resourceregion_id
- Region ID
Timeouts
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 5 mins) Used when create the Instance.delete
- (Defaults to 5 mins) Used when delete the Instance.update
- (Defaults to 5 mins) Used when update the Instance.
Import
EAIS Instance can be imported using the id, e.g.
$ terraform import alicloud_eais_instance.example <id>