Terraform module which creates UHost instance(s) on UCloud (required Terraform 0.12.).
These types of resources are supported:
# Create uhost instance attached with eip and cloud disk
module "uhost_instance" {
source = "terraform-ucloud-modules/uhost-instance/ucloud"
version = "1.0.0"
# uhost instance
instance_count = 2
availability_zone = "cn-bj2-05"
image_id = "uimage-ohveag"
instance_type = "n-standard-2"
password = "ucloud_2019"
instance_name = "example-complete-instance"
boot_disk_type = "cloud_ssd"
tag = "example-complete"
# eip
eip_count_per_instance = 1
eip_internet_type = "bgp"
eip_charge_mode = "bandwidth"
eip_name = "example-complete-eip"
# disk
disk_count_per_instance = 1
disk_size = 30
disk_type = "ssd_data_disk"
disk_name = "example-complete-disk"
}
Name | Description | Type | Default | Required |
---|---|---|---|---|
password | The password of instance | string | - | yes |
availability_zone | Available zone where instance and other resources are located. | string | - | yes |
image_id | ID of image to use for instances. | string | - | yes |
instance_type | The type of instance to launch. | string | - | yes |
count_format | Number format to use for output. | string | "%02d" |
no |
instance_count | Number of instances to launch. | string | "1" |
no |
instance_name | Name to be used on instances as prefix. | string | "TF-UHost-Instance" |
no |
charge_type | The charge type of instance and other related resources. Possible values: year, month, dynamic. | string | "month" |
no |
duration | The duration of purchase of the instance and other related resources | string | "1" |
no |
boot_disk_type | The type of system disk. Possible values: local_normal, local_ssd, cloud_normal, cloud_ssd. | string | "local_normal" |
no |
local_disk_size | The size of local data disk | string | "0" |
no |
local_disk_type | The type of local data disk. Possible values: local_normal, local_ssd. | string | "local_normal" |
no |
tag | The tag of instance and other related resources | string | "" |
no |
security_group | ID of security group to use for instances. If not set, the default security group will be used. | string | "" |
no |
isolation_group | ID of isolation group to use for instances. | string | "" |
no |
vpc_id | The VPC linked to the instance | string | "" |
no |
subnet_id | The Subnet linked to the instance | string | "" |
no |
disk_count_per_instance | Number of disks attach to per instance. | string | "0" |
no |
disk_name | Name to be used on disks as prefix | string | "TF-Disk" |
no |
disk_size | The size of cloud data disk. | string | "30" |
no |
disk_type | The type of cloud data disk. Possible values: data_disk, ssd_data_disk. | string | "data_disk" |
no |
eip_count_per_instance | Number of eips assiocate to per instance. | string | "0" |
no |
eip_name | Name to be used on eips as prefix | string | "TF-EIP" |
no |
eip_bandwidth | Maximum bandwidth to the elastic public network, measured in Mbps. | string | "1" |
no |
eip_internet_type | The type of eip routes. Possible values: international, bgp. | string | "bgp" |
no |
eip_charge_mode | The charge mode of eip. Possible values: traffic, bandwidth. | string | "bandwidth" |
no |
Name | Description |
---|---|
instance_ids | List of IDs of instances |
eip_ids | List of IDs of eips |
public_ips | List of public IP addresses assigned to the instances, if applicable |
disk_ids | List of IDs of disks |
instance_id | List of IDs of instances |
Module managed by mingsheng.su.