mirror of
https://github.com/ysoftdevs/terraform-aws-eks.git
synced 2026-01-19 01:57:35 +01:00
feat: Added throughput support for root and EBS disks (#1445)
This commit is contained in:
@@ -143,7 +143,7 @@ Apache 2 Licensed. See [LICENSE](https://github.com/terraform-aws-modules/terraf
|
||||
| Name | Version |
|
||||
|------|---------|
|
||||
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 0.13.1 |
|
||||
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 3.40.0 |
|
||||
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 3.44.0 |
|
||||
| <a name="requirement_http"></a> [http](#requirement\_http) | >= 2.4.1 |
|
||||
| <a name="requirement_kubernetes"></a> [kubernetes](#requirement\_kubernetes) | >= 1.11.1 |
|
||||
| <a name="requirement_local"></a> [local](#requirement\_local) | >= 1.4 |
|
||||
@@ -152,7 +152,7 @@ Apache 2 Licensed. See [LICENSE](https://github.com/terraform-aws-modules/terraf
|
||||
|
||||
| Name | Version |
|
||||
|------|---------|
|
||||
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 3.40.0 |
|
||||
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 3.44.0 |
|
||||
| <a name="provider_http"></a> [http](#provider\_http) | >= 2.4.1 |
|
||||
| <a name="provider_kubernetes"></a> [kubernetes](#provider\_kubernetes) | >= 1.11.1 |
|
||||
| <a name="provider_local"></a> [local](#provider\_local) | >= 1.4 |
|
||||
|
||||
@@ -73,5 +73,22 @@ module "eks" {
|
||||
public_ip = true
|
||||
elastic_inference_accelerator = "eia2.medium"
|
||||
},
|
||||
{
|
||||
name = "worker-group-4"
|
||||
instance_type = "t3.small"
|
||||
asg_desired_capacity = 1
|
||||
public_ip = true
|
||||
root_volume_size = 150
|
||||
root_volume_type = "gp3"
|
||||
root_volume_throughput = 300
|
||||
additional_ebs_volumes = [
|
||||
{
|
||||
block_device_name = "/dev/xvdb"
|
||||
volume_size = 100
|
||||
volume_type = "gp3"
|
||||
throughput = 150
|
||||
},
|
||||
]
|
||||
},
|
||||
]
|
||||
}
|
||||
|
||||
2
local.tf
2
local.tf
@@ -93,7 +93,7 @@ locals {
|
||||
service_linked_role_arn = "" # Arn of custom service linked role that Auto Scaling group will use. Useful when you have encrypted EBS
|
||||
termination_policies = [] # A list of policies to decide how the instances in the auto scale group should be terminated.
|
||||
platform = local.default_platform # Platform of workers. Either "linux" or "windows".
|
||||
additional_ebs_volumes = [] # A list of additional volumes to be attached to the instances on this Auto Scaling group. Each volume should be an object with the following: block_device_name (required), volume_size, volume_type, iops, encrypted, kms_key_id (only on launch-template), delete_on_termination. Optional values are grabbed from root volume or from defaults
|
||||
additional_ebs_volumes = [] # A list of additional volumes to be attached to the instances on this Auto Scaling group. Each volume should be an object with the following: block_device_name (required), volume_size, volume_type, iops, throughput, encrypted, kms_key_id (only on launch-template), delete_on_termination. Optional values are grabbed from root volume or from defaults
|
||||
additional_instance_store_volumes = [] # A list of additional instance store (local disk) volumes to be attached to the instances on this Auto Scaling group. Each volume should be an object with the following: block_device_name (required), virtual_name.
|
||||
warm_pool = null # If this block is configured, add a Warm Pool to the specified Auto Scaling group.
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ terraform {
|
||||
required_version = ">= 0.13.1"
|
||||
|
||||
required_providers {
|
||||
aws = ">= 3.40.0"
|
||||
aws = ">= 3.44.0"
|
||||
local = ">= 1.4"
|
||||
kubernetes = ">= 1.11.1"
|
||||
http = {
|
||||
|
||||
10
workers.tf
10
workers.tf
@@ -304,6 +304,11 @@ resource "aws_launch_configuration" "workers" {
|
||||
"root_iops",
|
||||
local.workers_group_defaults["root_iops"],
|
||||
)
|
||||
throughput = lookup(
|
||||
var.worker_groups[count.index],
|
||||
"root_volume_throughput",
|
||||
local.workers_group_defaults["root_volume_throughput"],
|
||||
)
|
||||
delete_on_termination = true
|
||||
}
|
||||
|
||||
@@ -327,6 +332,11 @@ resource "aws_launch_configuration" "workers" {
|
||||
"iops",
|
||||
local.workers_group_defaults["root_iops"],
|
||||
)
|
||||
throughput = lookup(
|
||||
ebs_block_device.value,
|
||||
"throughput",
|
||||
local.workers_group_defaults["root_volume_throughput"],
|
||||
)
|
||||
encrypted = lookup(
|
||||
ebs_block_device.value,
|
||||
"encrypted",
|
||||
|
||||
Reference in New Issue
Block a user