Skip to content

Commit

Permalink
Merge pull request #4 from wri/custom-launch-template
Browse files Browse the repository at this point in the history
use custom launch template to set storage size
  • Loading branch information
sunu authored Dec 13, 2024
2 parents aceacb1 + c51eb5c commit 5fc47de
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions terraform/resources/eks.tf
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ module "eks" {

eks_managed_node_group_defaults = {
ami_type = "AL2023_x86_64_STANDARD"
disk_size = 100
}

eks_managed_node_groups = {
Expand All @@ -75,6 +74,19 @@ module "eks" {
max_size = 1
desired_size = 0

# Launch template configuration
use_custom_launch_template = true
block_device_mappings = {
xvda = {
device_name = "/dev/xvda"
ebs = {
volume_size = 100
volume_type = "gp3"
delete_on_termination = true
}
}
}

# Needed by the aws-ebs-csi-driver
iam_role_additional_policies = {
AmazonEBSCSIDriverPolicy = "arn:aws:iam::aws:policy/service-role/AmazonEBSCSIDriverPolicy"
Expand All @@ -89,7 +101,19 @@ module "eks" {
min_size = 1
max_size = 2
desired_size = 1
disk_size = 100

# Launch template configuration
use_custom_launch_template = true
block_device_mappings = {
xvda = {
device_name = "/dev/xvda"
ebs = {
volume_size = 100
volume_type = "gp3"
delete_on_termination = true
}
}
}

# Needed by the aws-ebs-csi-driver
iam_role_additional_policies = {
Expand Down

0 comments on commit 5fc47de

Please sign in to comment.