Skip to content

Commit

Permalink
fix(eks): node volume config change (#346)
Browse files Browse the repository at this point in the history
* chore(eks): correct fargate name

* fix(eks): disk volume config change
  • Loading branch information
Young-ook authored Feb 14, 2024
1 parent 77b3a99 commit 8748e5a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 2 additions & 0 deletions defaults.tf
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ locals {
ami_type = "AL2_x86_64"
instance_type = "t3.medium"
capacity_type = null # allowed values: ON_DEMAND, SPOT, and default is null
volume_size = 20
volume_type = "gp3"
}
default_bottlerocket_config = {
admin_container_enabled = false
Expand Down
2 changes: 1 addition & 1 deletion examples/blueprint/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ variable "kubernetes_version" {
}

variable "fargate_profiles" {
description = "Amazon Fargate for EKS profiles"
description = "AWS Fargate for EKS profiles"
default = []
}

Expand Down
2 changes: 1 addition & 1 deletion examples/data-ai/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ variable "managed_node_groups" {
}

variable "fargate_profiles" {
description = "Amazon Fargate for EKS profiles"
description = "AWS Fargate for EKS profiles"
default = []
}

Expand Down
8 changes: 4 additions & 4 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,8 @@ resource "aws_launch_template" "ng" {
block_device_mappings {
device_name = "/dev/xvda"
ebs {
volume_size = lookup(each.value, "disk_size", "20")
volume_type = "gp2"
volume_size = lookup(each.value, "volume_size", local.default_eks_config.volume_size)
volume_type = lookup(each.value, "volume_type", local.default_eks_config.volume_type)
delete_on_termination = true
}
}
Expand Down Expand Up @@ -316,8 +316,8 @@ resource "aws_launch_template" "mng" {
block_device_mappings {
device_name = "/dev/xvda"
ebs {
volume_size = lookup(each.value, "disk_size", "20")
volume_type = "gp2"
volume_size = lookup(each.value, "volume_size", local.default_eks_config.volume_size)
volume_type = lookup(each.value, "volume_type", local.default_eks_config.volume_type)
delete_on_termination = true
}
}
Expand Down

0 comments on commit 8748e5a

Please sign in to comment.