Skip to content

Commit

Permalink
Missed a level of mapping around nodegroup declaration.
Browse files Browse the repository at this point in the history
  • Loading branch information
zawac002 committed Sep 1, 2023
1 parent f351a33 commit e53828f
Showing 1 changed file with 25 additions and 23 deletions.
48 changes: 25 additions & 23 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ locals {

# TBD - Why do we need nlb-policy
additional_policies = {
#'nlb-policy' = aws_iam_policy.nlb-policy.arn
# 'nlb-policy' = aws_iam_policy.nlb-policy.arn
}

ng_name = format("%v%v-nodegroup", local._prefixes["eks"], var.cluster_name)
Expand Down Expand Up @@ -130,28 +130,30 @@ module "cluster" {
)

eks_managed_node_groups = {
name = local.ng_name
capacity_type = "ON_DEMAND"

instance_types = var.eks_instance_types

min_size = var.eks_ng_min_size
max_size = var.eks_ng_max_size
desired_size = var.eks_ng_desired_size

iam_role_additional_policies = local.additional_policies

block_device_mappings = {
xvda = {
device_name = "/dev/xvda"
ebs = {
volume_size = var.eks_instance_disk_size
volume_type = "gp3"
iops = 3000
throughput = 125
encrypted = true
delete_on_termination = true
kms_key_id = data.aws_kms_key.ebs_key.arn
node_group = {
name = local.ng_name
capacity_type = "ON_DEMAND"

instance_types = var.eks_instance_types

min_size = var.eks_ng_min_size
max_size = var.eks_ng_max_size
desired_size = var.eks_ng_desired_size

iam_role_additional_policies = local.additional_policies

block_device_mappings = {
xvda = {
device_name = "/dev/xvda"
ebs = {
volume_size = var.eks_instance_disk_size
volume_type = "gp3"
iops = 3000
throughput = 125
encrypted = true
delete_on_termination = true
kms_key_id = data.aws_kms_key.ebs_key.arn
}
}
}
}
Expand Down

0 comments on commit e53828f

Please sign in to comment.