Skip to content

Commit

Permalink
Merge pull request #17 from stephbat/add_container_network_type
Browse files Browse the repository at this point in the history
add container_network_type
  • Loading branch information
shoudusse authored May 24, 2023
2 parents 40440bb + 9d5825b commit e207278
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 17 deletions.
33 changes: 17 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -265,22 +265,23 @@ inputs = {

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| availability\_zone | Availability Zone used to deploy | `string` | `"eu-west-0a"` | no |
| cluster\_desc | Description of the cluster | `string` | n/a | yes |
| 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> 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 |
| Name | Description | Type | Default | Required |
|--------------------------|-------------|------|---------|:--------:|
| availability\_zone | Availability Zone used to deploy | `string` | `"eu-west-0a"` | no |
| cluster\_desc | Description of the cluster | `string` | n/a | yes |
| 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 |
| container\_network\_type | Network type of the container | `string` | `overlay_l2` | 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> 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 |

## Outputs

Expand Down
2 changes: 1 addition & 1 deletion main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ resource "flexibleengine_cce_cluster_v3" "cce_cluster" {
flavor_id = var.cluster_flavor
vpc_id = var.vpc_id
subnet_id = var.network_id
container_network_type = "overlay_l2"
container_network_type = var.container_network_type
eip = var.cluster_eip
description = var.cluster_desc
extend_param = var.extend_param
Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ variable "cluster_eip" {
default = null
}

variable "container_network_type" {
description = "Network type of the container"
type = string
default = "overlay_l2"
}

variable "availability_zone" {
description = "Availability Zone used to deploy"
default = "eu-west-0a"
Expand Down

0 comments on commit e207278

Please sign in to comment.