Skip to content

cloud-labs-infra/terraform-huaweicloud-ecs

Repository files navigation

ECS VM instance

Requirements

Name Version
terraform ~> 1.7
huaweicloud ~>1.63

Providers

Name Version
huaweicloud ~>1.63

Modules

No modules.

Resources

Name Type
huaweicloud_compute_eip_associate.ecs_associated resource
huaweicloud_compute_instance.main resource
huaweicloud_availability_zones.zones data source
huaweicloud_images_image.compute_instance_image data source

Inputs

Name Description Type Default Required
agency_name Specifies the IAM agency name which is created on IAM to provide temporary credentials for ECS to access cloud services string null no
availability_zone Specifies the availability zone in which to create the instance string null no
data_disks Specifies the EVS Volumes and parameters:

* type - Specifies the ECS data disk type, which must be one of available disk types, contains of SSD, GPSSD and SAS;
* size - Specifies the data disk size, in GB. The value ranges form 10 to 32768;
* snapshot_id - Specifies the snapshot id;
* kms_key_id - Specifies the ID of a KMS key, this is used to encrypt the disk.
list(object({
volume_type = optional(string, "SSD")
size = optional(number, 40)
snapshot_id = optional(string)
kms_key_id = optional(string)
}))
[] no
data_disks1 Specifies the ECS data disks and parameters
list(object({
type = string
size = number
}))
[] no
description Specifies the description of the instance string null no
eip_address Specifies the EIP address to associate string null no
eip_enabled Enabler for EIP bool false no
flavor_name Specifies the name of the desired flavor for the instance string "s7n.medium.2" no
image_id Specifies the image ID of the desired image for the instance string null no
instance_image Requirements for Compute Instance Image
object({
name = optional(string, "Ubuntu 22.04 server 64bit")
visibility = optional(string, "public")
architecture = optional(string, "x86")
most_recent = optional(bool, true)
})
{} no
key_pair Specifies the SSH keypair name used for logging in to the instance string n/a yes
name Specifies the name of the ECS VM instance string n/a yes
name_postfix Name Postfix for ECS VM instance string null no
region Specifies the region in which to create the resource. If omitted, the provider-level region will be used string null no
security_group_ids Specifies an array of one or more security group IDs to associate with the instance list(string) [] no
subnet_id VPC Subnet ID in UUID format string n/a yes
system_disk_size Specifies the system disk size in GB number 40 no
system_disk_type Specifies the system disk type of the instance:

* SAS: high I/O disk type;
* SSD: ultra-high I/O disk type;
* GPSSD: general purpose SSD disk type;
* ESSD: Extreme SSD type.
string "GPSSD" no
tags Specifies the key/value pairs to associate with the VPC map(string) {} no

Outputs

Name Description
ip Compute Instance Private IP