Skip to content

Commit

Permalink
Merge pull request #13 from gllb/master
Browse files Browse the repository at this point in the history
Add cluster_type variable
  • Loading branch information
vlandemaine-orange authored Feb 17, 2022
2 parents 23050ed + 5711d76 commit 8ae2714
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 | <pre>list(object({<br> node_pool_index = string<br> node_pool_name = string<br> node_flavor = string<br> availability_zone = string<br> initial_node_count = number<br> scall_enable = bool<br> min_node_count = number<br> max_node_count = number<br> scale_down_cooldown_time = number<br> priority = number<br> root_volume_size = number<br> root_volume_type = string<br> data_volume_size = number<br> data_volume_type = string<br> node_labels = map(string)<br> taints = list(object({<br> key = string<br> value = string<br> effect = string<br> }))<br> postinstall_script = string<br> preinstall_script = string<br> }))</pre> | `[]` | no |
| node\_pool\_list | Nodes poool list of the CCE2 Cluster | <pre>list(object({<br> node_pool_index = string<br> node_pool_name = string<br> node_flavor = string<br> availability_zone = string<br> initial_node_count = number<br> scall_enable = bool<br> min_node_count = number<br> max_node_count = number<br> scale_down_cooldown_time = number<br> priority = number<br> root_volume_size = number<br> root_volume_type = string<br> type = string<br> data_volume_size = number<br> data_volume_type = string<br> node_labels = map(string)<br> taints = list(object({<br> key = string<br> value = string<br> effect = string<br> }))<br> postinstall_script = string<br> preinstall_script = string<br> }))</pre> | `[]` | no |
| nodes\_list | Nodes list of the CCE2 Cluster | <pre>list(object({<br> node_index = string<br> node_name = string<br> node_flavor = string<br> availability_zone = string<br> root_volume_size = number<br> root_volume_type = string<br> data_volume_size = number<br> data_volume_type = string<br> node_labels = map(string)<br> vm_tags = map(string)<br> taints = list(object({<br> key = string<br> value = string<br> effect = string<br> }))<br> postinstall_script = string<br> preinstall_script = string<br> }))</pre> | `[]` | no |
| vpc\_id | ID of the VPC | `string` | n/a | yes |

Expand Down
4 changes: 2 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 8ae2714

Please sign in to comment.