From 870cc47d2fdb19b2e4f226105099b3cbc323ca83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20Mudrini=C4=87?= Date: Fri, 21 Oct 2022 22:13:43 +0200 Subject: [PATCH] Make worker volume size configurable in AWS configs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marko Mudrinić --- examples/terraform/aws/README.md | 1 + examples/terraform/aws/output.tf | 6 +++--- examples/terraform/aws/variables.tf | 6 ++++++ 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/examples/terraform/aws/README.md b/examples/terraform/aws/README.md index 65089d84e..a37586fe6 100644 --- a/examples/terraform/aws/README.md +++ b/examples/terraform/aws/README.md @@ -87,6 +87,7 @@ No modules. | [worker\_deploy\_ssh\_key](#input\_worker\_deploy\_ssh\_key) | add provided ssh public key to MachineDeployments | `bool` | `true` | no | | [worker\_os](#input\_worker\_os) | OS to run on worker machines, default to var.os | `string` | `""` | no | | [worker\_type](#input\_worker\_type) | instance type for workers | `string` | `"t3.medium"` | no | +| [worker\_volume\_size](#input\_worker\_volume\_size) | Size of the EBS volume, in Gb | `number` | `50` | no | ## Outputs diff --git a/examples/terraform/aws/output.tf b/examples/terraform/aws/output.tf index 2eefde166..64e8e60b7 100644 --- a/examples/terraform/aws/output.tf +++ b/examples/terraform/aws/output.tf @@ -125,7 +125,7 @@ output "kubeone_workers" { subnetId = local.subnets[local.zoneA] instanceType = var.worker_type assignPublicIP = true - diskSize = 50 + diskSize = var.worker_volume_size diskType = "gp2" ## Only applicable if diskType = io1 diskIops = 500 @@ -183,7 +183,7 @@ output "kubeone_workers" { subnetId = local.subnets[local.zoneB] instanceType = var.worker_type assignPublicIP = true - diskSize = 50 + diskSize = var.worker_volume_size diskType = "gp2" ## Only applicable if diskType = io1 diskIops = 500 @@ -241,7 +241,7 @@ output "kubeone_workers" { subnetId = local.subnets[local.zoneC] instanceType = var.worker_type assignPublicIP = true - diskSize = 50 + diskSize = var.worker_volume_size diskType = "gp2" ## Only applicable if diskType = io1 diskIops = 500 diff --git a/examples/terraform/aws/variables.tf b/examples/terraform/aws/variables.tf index 9c74969c4..aa1f4d45d 100644 --- a/examples/terraform/aws/variables.tf +++ b/examples/terraform/aws/variables.tf @@ -146,6 +146,12 @@ variable "worker_type" { type = string } +variable "worker_volume_size" { + default = 50 + description = "Size of the EBS volume, in Gb" + type = number +} + variable "bastion_type" { default = "t3.nano" description = "instance type for bastion"