alicloud_eais_instance
更新时间:
Provides a Elastic Accelerated Computing Instances (EAIS) Instance resource.
For information about Elastic Accelerated Computing Instances (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
}
Argument Reference
The following arguments are supported:
instance_type
- (Required, ForceNew) The type of the Instance. Valid values:eais.ei-a6.4xlarge
,eais.ei-a6.2xlarge
,eais.ei-a6.xlarge
,eais.ei-a6.large
,eais.ei-a6.medium
.vswitch_id
- (Required, ForceNew) The ID of the vSwitch.security_group_id
- (Required, ForceNew) The ID of the security group.instance_name
- (Optional, ForceNew) The name of the Instance.force
- (Optional, Bool) Specifies whether to force delete the Instance. Default value:false
. Valid values:true
: Enable.false
: Disable.
Attributes Reference
The following attributes are exported:
id
- The resource ID in terraform of Instance.status
- The status of the Instance.
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.
Import
Elastic Accelerated Computing Instances (EAIS) Instance can be imported using the id, e.g.
$ terraform import alicloud_eais_instance.example <id>
文档内容是否对您有帮助?