diff --git a/README.md b/README.md index 7a14c14..25b1cdf 100644 --- a/README.md +++ b/README.md @@ -272,12 +272,13 @@ inputs = { | cluster\_eip | EIP of the cluster | `string` | `null` | no | | cluster\_flavor | Flavor of the CCE2 Cluster | `string` | n/a | yes | | cluster\_name | Name of the cluster | `string` | n/a | yes | +| cluster\_type | Cluster Type, possible values are VirtualMachine and BareMetal | `string` | VirtualMachine | no | | cluster\_version | Version of the cluster | `string` | n/a | yes | | extend\_param | Extended Parameters | `map(string)` | `{}` | no | | key\_pair | Name of the SSH key pair | `string` | n/a | yes | | network\_id | ID of the Network | `string` | n/a | yes | | node\_os | Operating System of the CCE Worker Node | `string` | n/a | yes | -| node\_pool\_list | Nodes poool list of the CCE2 Cluster |
list(object({
node_pool_index = string
node_pool_name = string
node_flavor = string
availability_zone = string
initial_node_count = number
scall_enable = bool
min_node_count = number
max_node_count = number
scale_down_cooldown_time = number
priority = number
root_volume_size = number
root_volume_type = string
data_volume_size = number
data_volume_type = string
node_labels = map(string)
taints = list(object({
key = string
value = string
effect = string
}))
postinstall_script = string
preinstall_script = string
}))
| `[]` | no | +| node\_pool\_list | Nodes poool list of the CCE2 Cluster |
list(object({
node_pool_index = string
node_pool_name = string
node_flavor = string
availability_zone = string
initial_node_count = number
scall_enable = bool
min_node_count = number
max_node_count = number
scale_down_cooldown_time = number
priority = number
root_volume_size = number
root_volume_type = string
type = string
data_volume_size = number
data_volume_type = string
node_labels = map(string)
taints = list(object({
key = string
value = string
effect = string
}))
postinstall_script = string
preinstall_script = string
}))
| `[]` | no | | nodes\_list | Nodes list of the CCE2 Cluster |
list(object({
node_index = string
node_name = string
node_flavor = string
availability_zone = string
root_volume_size = number
root_volume_type = string
data_volume_size = number
data_volume_type = string
node_labels = map(string)
vm_tags = map(string)
taints = list(object({
key = string
value = string
effect = string
}))
postinstall_script = string
preinstall_script = string
}))
| `[]` | no | | vpc\_id | ID of the VPC | `string` | n/a | yes | diff --git a/main.tf b/main.tf index 9eb8f8e..55e21d6 100644 --- a/main.tf +++ b/main.tf @@ -1,6 +1,6 @@ resource "flexibleengine_cce_cluster_v3" "cce_cluster" { name = var.cluster_name - cluster_type = "VirtualMachine" + cluster_type = var.cluster_type cluster_version = var.cluster_version flavor_id = var.cluster_flavor vpc_id = var.vpc_id @@ -81,7 +81,7 @@ resource "flexibleengine_cce_node_pool_v3" "cce_node_pool" { scale_down_cooldown_time = each.value.scale_down_cooldown_time priority = each.value.priority - type = "vm" + type = each.value.type postinstall = each.value.postinstall_script preinstall = each.value.preinstall_script diff --git a/variables.tf b/variables.tf index 1866711..8afb84c 100644 --- a/variables.tf +++ b/variables.tf @@ -13,6 +13,12 @@ variable "cluster_desc" { type = string } +variable "cluster_type" { + description = "Cluster Type, possible values are VirtualMachine and BareMetal" + type = string + default = "VirtualMachine" +} + variable "cluster_eip" { description = "EIP of the cluster" type = string @@ -104,6 +110,7 @@ variable "node_pool_list" { priority = number root_volume_size = number root_volume_type = string + type = string data_volume_size = number data_volume_type = string node_labels = map(string)